#include <bits/stdc++.h>
using namespace std;
const int mm = 101;
int a[mm][mm];
int main() {
  int n, times;
  char ch;
  bool judge1 = false, judge2;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    times = 0;
    for (int j = 1; j <= n; j++) {
      cin >> ch;
      if (ch == 'E')
        a[i][j] = 1;
      else {
        a[i][j] = 0;
        times++;
      }
    }
    if (times == 0) judge1 = true;
  }
  if (judge1) {
    for (int j = 1; j <= n; j++) {
      judge2 = false;
      for (int i = 1; i <= n; i++) {
        if (a[i][j] == 0) {
          judge2 = true;
          break;
        }
      }
      if (judge2 == false) {
        cout << -1 << endl;
        return 0;
      }
    }
    for (int j = 1; j <= n; j++) {
      for (int i = 1; i <= n; i++) {
        if (a[i][j] == 0) {
          cout << i << " " << j << endl;
          break;
        }
      }
    }
  } else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (a[i][j] == 0) {
          cout << i << " " << j << endl;
          break;
        }
      }
    }
  }
  return 0;
}
