#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
char a[111][111];
void tests() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%s", a[i]);
  bool row = false, col = false;
  for (int i = 0; i < n; i++) {
    row = true;
    for (int j = 0; j < n; j++)
      if (a[i][j] != 'E') row = false;
    if (row) break;
  }
  for (int j = 0; j < n; j++) {
    col = true;
    for (int i = 0; i < n; i++)
      if (a[i][j] != 'E') col = false;
    if (col) break;
  }
  if (row && col)
    printf("%d\n", -1);
  else if (!row) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (a[i][j] != 'E') {
          printf("%d %d\n", i + 1, j + 1);
          break;
        }
  } else {
    for (int j = 0; j < n; j++)
      for (int i = 0; i < n; i++)
        if (a[i][j] != 'E') {
          printf("%d %d\n", i + 1, j + 1);
          break;
        }
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T--) {
    tests();
  }
  return 0;
}
