#include <bits/stdc++.h>
using namespace std;
const int M = 105;
char a[M][M];
int row[M], col[M], N;
int32_t main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      cin >> a[i][j];
      if (a[i][j] == '.') {
        row[i]++;
        col[j]++;
      }
    }
  }
  bool Col = true, Row = true;
  for (int i = 0; i < N; i++) {
    Row = Row & (row[i] > 0);
    Col = Col & (col[i] > 0);
  }
  if (Col == 0 && Row == 0) {
    cout << -1 << "\n";
  } else if (Row) {
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < N; j++) {
        if (a[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << "\n";
          break;
        }
      }
    }
  } else {
    for (int j = 0; j < N; j++) {
      for (int i = 0; i < N; i++) {
        if (a[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << "\n";
          break;
        }
      }
    }
  }
}
