#include <bits/stdc++.h>
using namespace std;
int n;
int num[109][109];
int a[109];
int b[109];
char str[109];
int flaga, flagb;
void check() {
  for (int i = 0; i < n; i++) {
    if (a[i] == n) {
      flaga = 0;
    }
    if (b[i] == n) {
      flagb = 0;
    }
  }
}
int main() {
  scanf("%d", &n);
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  for (int i = 0; i < n; i++) {
    scanf("%s", str);
    for (int j = 0; j < n; j++) {
      if (str[j] == '.') {
        num[i][j] = 0;
      } else {
        num[i][j] = 1;
      }
      b[j] += num[i][j];
      a[i] += num[i][j];
    }
  }
  flaga = 1;
  flagb = 1;
  check();
  if (flaga == 0 && flagb == 0) {
    printf("-1\n");
    return 0;
  }
  if (flaga != 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (num[i][j] == 0) {
          printf("%d %d\n", i + 1, j + 1);
          break;
        }
      }
    }
  } else {
    for (int j = 0; j < n; j++) {
      for (int i = 0; i < n; i++) {
        if (num[i][j] == 0) {
          printf("%d %d\n", i + 1, j + 1);
          break;
        }
      }
    }
  }
  return 0;
}
