#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char matrice[105][105];
  bool lie[105] = {0};
  bool hang[105] = {0};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    getchar();
    for (int j = 0; j < n; j++) scanf("%c", &matrice[i][j]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (matrice[i][j] == '.') {
        hang[i] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (matrice[j][i] == '.') {
        lie[i] = 1;
      }
    }
  }
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (lie[i] == 0 && hang[j] == 0) flag = 1;
    }
  }
  if (flag == 1) {
    cout << "-1";
    return 0;
  } else {
    for (int i = 0; i < n; i++) {
      if (lie[i] == 0) flag = 2;
    }
    for (int i = 0; i < n; i++) {
      if (hang[i] == 0) flag = 3;
    }
  }
  if (flag == 2 || flag == 0) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        if (matrice[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    return 0;
  }
  if (flag == 3 || flag == 0) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        if (matrice[j][i] == '.') {
          cout << j + 1 << " " << i + 1 << endl;
          break;
        }
      }
  }
  return 0;
}
