#include <bits/stdc++.h>
using namespace std;
const int N = 111;
char mat[N][N];
bool check(bool *b, int n) {
  for (int i = 1; i <= n; i++)
    if (!b[i]) return false;
  return true;
}
int main() {
  int n;
  while (cin >> n) {
    bool r[N], c[N];
    for (int i = 1; i <= n; i++) cin >> mat[i] + 1;
    memset(r, 0, sizeof(r));
    memset(c, 0, sizeof(c));
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (mat[i][j] == '.') r[i] = c[j] = 1;
      }
    }
    if (check(r, n)) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
          if (mat[i][j] == '.') {
            cout << i << ' ' << j << endl;
            break;
          }
        }
      }
      continue;
    } else if (check(c, n)) {
      for (int j = 1; j <= n; j++) {
        for (int i = 1; i <= n; i++) {
          if (mat[i][j] == '.') {
            cout << i << ' ' << j << endl;
            break;
          }
        }
      }
      continue;
    } else if (check(c, n)) {
    } else
      puts("-1");
  }
  return 0;
}
