#include <bits/stdc++.h>
using namespace std;
char mt[101][101];
bool chkr[101], chkc[101];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> mt[i][j];
      chkr[i] |= (mt[i][j] == '.');
      chkc[j] |= (mt[i][j] == '.');
    }
  }
  int c1 = accumulate(chkr, chkr + 101, 0),
      c2 = accumulate(chkc, chkc + 101, 0);
  if (c1 == n) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (mt[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << "\n";
          break;
        }
  } else if (c2 == n) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (mt[j][i] == '.') {
          cout << j + 1 << " " << i + 1 << "\n";
          break;
        }
  } else
    cout << -1;
  return 0;
}
