#include <bits/stdc++.h>
using namespace std;
int al[110], ar[110], l, r;
int a[110][110];
int main() {
  int n, i, j;
  char ch;
  cin >> n;
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      cin >> ch;
      if (ch == '.') a[i][j] = al[i] = ar[j] = 1;
    }
  for (i = 0; i < n; i++) r += ar[i];
  for (i = 0; i < n; i++) l += al[i];
  if (l < n && r < n) {
    cout << -1 << endl;
    return 0;
  }
  if (l == n)
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        if (a[i][j]) {
          cout << i + 1 << ' ' << j + 1 << endl;
          break;
        }
    }
  else {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        if (a[j][i]) {
          cout << j + 1 << ' ' << i + 1 << endl;
          break;
        }
    }
  }
}
