#include <bits/stdc++.h>
using namespace std;
int const N = 100 + 20;
int n;
bool a[N][N], col[N], row[N], f;
char ch;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = (int)(0); i < (int)(n); i++)
    for (int j = (int)(0); j < (int)(n); j++) {
      cin >> ch;
      a[i][j] = (ch == '.');
      row[i] |= a[i][j];
      col[j] |= a[i][j];
    }
  f = 1;
  for (int i = (int)(0); i < (int)(n); i++) f &= row[i];
  if (f) {
    for (int i = (int)(0); i < (int)(n); i++) {
      for (int j = (int)(0); j < (int)(n); j++) {
        if (a[i][j]) {
          cout << i + 1 << ' ' << j + 1 << '\n';
          break;
        }
      }
    }
    return 0;
  }
  f = 1;
  for (int i = (int)(0); i < (int)(n); i++) f &= col[i];
  if (f) {
    for (int j = (int)(0); j < (int)(n); j++) {
      for (int i = (int)(0); i < (int)(n); i++) {
        if (a[i][j]) {
          cout << i + 1 << ' ' << j + 1 << '\n';
          break;
        }
      }
    }
    return 0;
  }
  return cout << -1, 0;
}
