#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[110][110] = {0};
  int a[110] = {0};
  int b[110] = {0};
  int n, p, k, A = 0, B = 0;
  char ch;
  scanf("%d", &n);
  scanf("%c", &ch);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%c", &arr[i][j]);
      if (arr[i][j] == '.') {
        a[i]++;
        b[j]++;
      }
    }
    scanf("%c", &ch);
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) {
      A = 1;
    }
    if (b[i] == 0) {
      B = 1;
    }
  }
  if (A != 1) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        if (arr[i][j] == '.') {
          cout << i << " " << j << endl;
          break;
        }
  } else if (B != 1) {
    for (int j = 1; j <= n; j++)
      for (int i = 1; i <= n; i++)
        if (arr[i][j] == '.') {
          cout << i << " " << j << endl;
          break;
        }
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
