#include <bits/stdc++.h>
using namespace std;
int n, m;
char mp[110][110];
bool imp(int x, int y) {
  for (int i = 0; i < n; i++) {
    if (mp[x][i] != 'E') return false;
    if (mp[i][y] != 'E') return false;
  }
  return true;
}
void c() {
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < n; i++) {
      if (mp[i][j] != 'E') {
        cout << i + 1 << " " << j + 1 << endl;
        break;
      }
    }
  }
}
void r() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (mp[i][j] != 'E') {
        cout << i + 1 << " " << j + 1 << endl;
        break;
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> mp[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (mp[i][j] == 'E' && imp(i, j)) {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  int flg = 0;
  for (int i = 0; i < n; i++) {
    int f = 0;
    for (int j = 0; j < n; j++) {
      if (mp[i][j] != 'E') f = 1;
    }
    if (f == 0) flg = 1;
  }
  if (flg == 1) {
    c();
  } else {
    r();
  }
  return 0;
}
