#include <bits/stdc++.h>
using namespace std;
bool g[105][105];
bool row[105];
bool column[105];
int main() {
  char ch;
  int n;
  cin >> n;
  memset(row, 0, sizeof(row));
  memset(column, 0, sizeof(column));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      cin >> ch;
      g[i][j] = (ch == '.');
      row[i] |= g[i][j];
      column[j] |= g[i][j];
    }
  bool s = 1;
  for (int i = 0; i < n; i++) s &= row[i];
  if (s) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        if (g[i][j]) {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    return 0;
  }
  s = 1;
  for (int i = 0; i < n; i++) s &= column[i];
  if (s) {
    for (int j = 0; j < n; j++)
      for (int i = 0; i < n; i++) {
        if (g[i][j]) {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    return 0;
  } else
    cout << -1 << endl;
}
