#include <bits/stdc++.h>
using namespace std;
void solve() {
  int N;
  cin >> N;
  char arr[110][110];
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= N; j++) {
      cin >> arr[i][j];
    }
  }
  bool track = true;
  for (int i = 1; i <= N; i++) {
    bool bad = true;
    for (int j = 1; j <= N; j++) {
      if (arr[i][j] == '.') {
        bad = false;
        break;
      }
    }
    if (bad) {
      track = false;
      break;
    }
  }
  if (track) {
    for (int i = 1; i <= N; i++) {
      for (int j = 1; j <= N; j++) {
        if (arr[i][j] == '.') {
          cout << i << ' ' << j << '\n';
          break;
        }
      }
    }
    return;
  }
  track = true;
  for (int j = 1; j <= N; j++) {
    bool bad = true;
    for (int i = 1; i <= N; i++) {
      if (arr[i][j] == '.') {
        bad = false;
        break;
      }
    }
    if (bad) {
      track = false;
      break;
    }
  }
  if (track) {
    for (int j = 1; j <= N; j++) {
      for (int i = 1; i <= N; i++) {
        if (arr[i][j] == '.') {
          cout << i << ' ' << j << '\n';
          break;
        }
      }
    }
    return;
  }
  cout << -1 << '\n';
}
int main() {
  solve();
  return 0;
}
