#include <bits/stdc++.h>
using namespace std;
char Map[105][105];
int n;
int r, c;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%s", Map[i]);
  r = 1;
  c = 1;
  for (int i = 0; i < n; i++) {
    int flag1 = 1, flag2 = 1;
    for (int j = 0; j < n; j++) {
      if (Map[i][j] == '.') flag1 = 0;
      if (Map[j][i] == '.') flag2 = 0;
    }
    if (flag1) r = 0;
    if (flag2) c = 0;
  }
  if (r == 0 && c == 0) cout << "-1" << endl;
  if (r) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++)
        if (Map[i][j] == '.') {
          cout << i + 1 << ' ' << j + 1 << endl;
          break;
        }
    }
  } else if (c) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++)
        if (Map[j][i] == '.') {
          cout << j + 1 << ' ' << i + 1 << endl;
          break;
        }
    }
  }
  return 0;
}
