#include <bits/stdc++.h>
using namespace std;
int c, r, n;
char x[200][200];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 1; j <= n; j++) {
      cin >> x[i][j];
      cnt += (x[i][j] == 'E');
    }
    if (cnt == n) r++;
  }
  for (int j = 1; j <= n; j++) {
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      cnt += (x[i][j] == 'E');
    }
    if (cnt == n) c++;
  }
  if (c && r) {
    puts("-1");
    return 0;
  }
  if (c) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (x[i][j] != 'E') {
          cout << i << ' ' << j << endl;
          break;
        }
      }
    }
  } else {
    for (int j = 1; j <= n; j++) {
      for (int i = 1; i <= n; i++) {
        if (x[i][j] != 'E') {
          cout << i << ' ' << j << endl;
          break;
        }
      }
    }
  }
}
