#include <bits/stdc++.h>
using namespace std;
int n;
string a[101];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int fullRow = 0;
  int fullCol = 0;
  for (int row = 0; row < n; ++row) {
    int cnt = 0;
    for (int col = 0; col < n; ++col) {
      cnt += a[row][col] == 'E';
    }
    if (cnt == n) {
      fullRow = true;
      break;
    }
  }
  for (int col = 0; col < n; ++col) {
    int cnt = 0;
    for (int row = 0; row < n; ++row) {
      cnt += a[row][col] == 'E';
    }
    if (cnt == n) {
      fullCol = true;
      break;
    }
  }
  if (fullRow && fullCol) {
    cout << -1 << endl;
    return 0;
  }
  if (!fullRow) {
    for (int row = 0; row < n; ++row) {
      for (int col = 0; col < n; ++col) {
        if (a[row][col] == '.') {
          cout << row + 1 << ' ' << col + 1 << endl;
          break;
        }
      }
    }
  } else {
    for (int col = 0; col < n; ++col) {
      for (int row = 0; row < n; ++row) {
        if (a[row][col] == '.') {
          cout << row + 1 << ' ' << col + 1 << endl;
          break;
        }
      }
    }
  }
  return 0;
}
