#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cstdio>
#include<map>
#include<vector>
#include<set>
#include<cmath>
#include<queue>
using namespace std;
#define more ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
const int N = 2e5 + 5, INF = 0x3f3f3f3f, MOD = 1e9 + 7;
typedef long long LL;
typedef unsigned long long usLL;
typedef pair<int, int> PII;
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
char S[502][502];
void solve()
{
int n, m; cin >> n >> m;
for (int i = 0; i < n; i++)
cin >> S[i];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
{
if (S[i][j] == '.')
{
int t = 0;
for (int k = 0; k < 4; k++)
{
int xx = i + dx[k], yy = j + dy[k];
if (xx < 0 || yy < 0 || xx >= n || xx >= m) continue;
if (S[xx][yy] == '#')
{
t++;
}
}
if (t >= 2)
{
cout << i + 1 << ' ' << j + 1<<endl;
return;
}
}
}
}
int main()
{
more;
solve();
return 0;
}