#include <bits/stdc++.h>
using namespace std;
bool ok1, ok2;
char c[101][101];
int n, i, j, a[101], b[101];
int main() {
  scanf("%d\n", &n);
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      scanf("%c", &c[i][j]);
      if (c[i][j] == 'E') {
        ++a[i];
        ++b[j];
      }
    }
    scanf("\n");
  }
  for (i = 0; i < n; ++i)
    if (a[i] == n) ok1 = true;
  for (i = 0; i < n; ++i)
    if (b[i] == n) ok2 = true;
  if (ok1 == true && ok2 == true)
    cout << -1;
  else {
    if (ok1 == false) {
      for (i = 0; i < n; ++i)
        for (j = 0; j < n; ++j)
          if (c[i][j] == '.') {
            cout << i + 1 << " " << j + 1 << endl;
            break;
          }
    } else {
      for (i = 0; i < n; ++i)
        for (j = 0; j < n; ++j)
          if (c[j][i] == '.') {
            cout << j + 1 << " " << i + 1 << endl;
            break;
          }
    }
  }
  return 0;
}
