300963: CF181A. Series of Crimes

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Series of Crimes

题意翻译

给出一幅$n$行$m$列的图,其中有3个`*`,求另一个`*`的位置使得这4个`*`构成一个矩形。

题目描述

The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang. The Berland capital's map is represented by an $ n×m $ rectangular table. Each cell of the table on the map represents some districts of the capital. The capital's main detective Polycarpus took a map and marked there the districts where the first three robberies had been committed as asterisks. Deduction tells Polycarpus that the fourth robbery will be committed in such district, that all four robbed districts will form the vertices of some rectangle, parallel to the sides of the map. Polycarpus is good at deduction but he's hopeless at math. So he asked you to find the district where the fourth robbery will be committed.

输入输出格式

输入格式


The first line contains two space-separated integers $ n $ and $ m $ ( $ 2<=n,m<=100 $ ) — the number of rows and columns in the table, correspondingly. Each of the next $ n $ lines contains $ m $ characters — the description of the capital's map. Each character can either be a "." (dot), or an "\*" (asterisk). A character equals "\*" if the corresponding district has been robbed. Otherwise, it equals ".". It is guaranteed that the map has exactly three characters "\*" and we can always find the fourth district that meets the problem requirements.

输出格式


Print two integers — the number of the row and the number of the column of the city district that is the fourth one to be robbed. The rows are numbered starting from one from top to bottom and the columns are numbered starting from one from left to right.

输入输出样例

输入样例 #1

3 2
.*
..
**

输出样例 #1

1 1

输入样例 #2

3 3
*.*
*..
...

输出样例 #2

2 3

Input

题意翻译

给出一幅$n$行$m$列的图,其中有3个`*`,求另一个`*`的位置使得这4个`*`构成一个矩形。

加入题单

算法标签: