#include <bits/stdc++.h>
using namespace std;
int n;
bool r[105], c[105], row = 1, col = 1;
char a[105][105];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      r[i] |= (a[i][j] == '.');
      c[j] |= (a[i][j] == '.');
    }
  }
  for (int i = 0; i < n; i++) col &= c[i], row &= r[i];
  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 if (col) {
    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;
        }
  } else
    cout << -1;
}
