#include <bits/stdc++.h>
char mp[111][111];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%s", mp[i]);
  int flag1 = 0;
  for (int i = 0; i < n; i++) {
    int tmp = 1;
    for (int j = 0; j < n; j++)
      if (mp[i][j] == '.') tmp = 0;
    if (tmp) {
      flag1++;
      break;
    }
  }
  int flag2 = 0;
  for (int j = 0; j < n; j++) {
    int tmp = 1;
    for (int i = 0; i < n; i++)
      if (mp[i][j] == '.') tmp = 0;
    if (tmp) {
      flag2++;
      break;
    }
  }
  if (flag1 == 1 && flag2 == 1) {
    printf("-1\n");
  } else {
    if (flag1) {
      for (int j = 0; j < n; j++) {
        int i = 0;
        while (i < n && mp[i][j] == 'E') i++;
        printf("%d %d\n", i + 1, j + 1);
      }
    } else {
      for (int i = 0; i < n; i++) {
        int j = 0;
        while (j < n && mp[i][j] == 'E') j++;
        printf("%d %d\n", i + 1, j + 1);
      }
    }
  }
  return 0;
}
