#include <bits/stdc++.h>
using namespace std;
int n, m, hh[110], cc[110], cnt = 0;
bool flag[110][110], hehe[110];
struct node {
  int x;
  int y;
} a[110 * 110];
bool check() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (flag[i][j] == 1 && hh[i] == 0 && cc[j] == 0) return false;
  return true;
}
bool mycmp(node a, node b) {
  return (a.y < b.y) || ((a.y == b.y && a.x < b.x));
}
void init() {
  scanf("%d", &n);
  char ch;
  m = n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> ch;
      if (ch == 'E')
        flag[i][j] = 1;
      else
        hh[i] = 1, cc[j] = 1;
    }
  if (check() == false)
    cout << -1 << endl;
  else {
    int flag1 = 0, flag2 = 0;
    for (int i = 1; i <= n; i++)
      if (hh[i] == 0) flag1 = 1;
    for (int i = 1; i <= n; i++)
      if (cc[i] == 0) flag2 = 1;
    if (flag1) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
          if (flag[j][i] == 0) {
            cout << j << ' ' << i << endl;
            break;
          }
      return;
    }
    if (flag2) {
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
          if (flag[i][j] == 0) {
            cout << i << ' ' << j << endl;
            break;
          }
      return;
    }
    memset(hh, 0, sizeof(hh));
    memset(cc, 0, sizeof(cc));
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++)
        if (flag[i][j] == 0) {
          cout << i << ' ' << j << endl;
          cc[j] = 1;
          break;
        }
  }
}
int main() {
  init();
  return 0;
}
