#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long LINF = 1e18;
const int INF = 1e9;
const double EPS = 1e-8;
int g[110][110];
int v1[110], v2[110];
int main() {
  int n;
  cin >> n;
  int flag = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      char c;
      cin >> c;
      if (c == '.') {
        g[i][j] = 1;
        v1[i] = 1;
        v2[j] = 1;
      }
    }
  }
  int t1 = 0, t2 = 0;
  for (int i = 1; i <= n; i++) {
    if (v1[i] == 0) t1 = 1;
    if (v2[i] == 0) t2 = 1;
  }
  if (t1 && t2)
    cout << -1 << endl;
  else {
    if (t1) {
      for (int j = 1; j <= n; j++) {
        for (int i = 1; i <= n; i++) {
          if (g[i][j]) {
            cout << i << ' ' << j << endl;
            break;
          }
        }
      }
    } else {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
          if (g[i][j]) {
            cout << i << ' ' << j << endl;
            break;
          }
        }
      }
    }
  }
}
