#include <bits/stdc++.h>
using namespace std;
int mass[200][200], row[200], col[200], d[200][200], r[200], c[200];
int dots[200][200];
int main() {
  char ch;
  int n, m, i, j, x1 = 0, x2 = 0, a, b, tmp = 2, tmpj;
  cin >> n;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      cin >> ch;
      if (ch == 'E')
        mass[i][j] = 1;
      else {
        mass[i][j] = 0;
        row[i]++;
        col[j]++;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (row[i] == 0) x1 = 1;
    if (col[i] == 0) x2 = 1;
    if (row[i] == 0) tmp = 1;
    if (col[i] == 0) tmp = 0;
  }
  if (x1 == 1 && x2 == 1) {
    cout << -1;
    return 0;
  }
  if (tmp == 2 || tmp == 0)
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (mass[i][j] == 0) {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    }
  else {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (mass[j][i] == 0) {
          cout << j + 1 << " " << i + 1 << endl;
          break;
        }
      }
    }
  }
  return 0;
}
