#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int a[n][m];
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    for (int j = 0; j < m; ++j) {
      if (s[j] == '.')
        a[i][j] = 0;
      else
        a[i][j] = 1;
    }
  }
  int x = -1, y = -1;
  for (int i = 0; i < n; ++i) {
    int sum = 0;
    for (int j = 0; j < m; ++j) {
      sum += a[i][j];
    }
    if (sum == 1) {
      x = i + 1;
    }
  }
  for (int i = 0; i < m; ++i) {
    int sum = 0;
    for (int j = 0; j < n; ++j) {
      sum += a[j][i];
    }
    if (sum == 1) {
      y = i + 1;
    }
  }
  cout << x << " " << y << '\n';
  return 0;
}
