#include <bits/stdc++.h>
using namespace std;
const int nmax = int(1e2) + 3;
int n;
bool evil[nmax][nmax], cure[nmax][nmax];
int dp[nmax][nmax];
int pl[nmax], pc[nmax];
char s[nmax];
int main() {
  cin >> n;
  cin.get();
  for (int i = 1; i <= n; i++) {
    cin.getline(s, nmax);
    for (int j = 0; j < (int)n; j++) {
      if (s[j] == 'E') {
        evil[i][j + 1] = true;
      } else {
        pl[i]++;
        pc[j + 1]++;
      }
    }
  }
  bool badLine = false;
  bool badCol = false;
  for (int i = 1; i <= n; i++) {
    if (n - pl[i] < n) {
      for (int j = 1; j <= n; j++) {
        cure[i][j] = true;
      }
    } else
      badLine = true;
    if (n - pc[i] < n) {
      for (int j = 1; j <= n; j++) {
        cure[j][i] = true;
      }
    } else
      badCol = true;
  }
  if (!badLine) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (evil[i][j] == false) {
          cout << i << " " << j << "\n";
          break;
        }
      }
    }
  } else if (!badCol) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (evil[j][i] == false) {
          cout << j << " " << i << "\n";
          break;
        }
      }
    }
  } else {
    cout << -1;
  }
  return 0;
}
