#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    char a[200][200];
    int b[200][2] = {0};
    int i = 1;
    while (i <= n) {
      int j = 1;
      while (j <= n) {
        cin >> a[i][j];
        if (a[i][j] == '.') {
          b[i][0] = 1;
          b[j][1] = 1;
        }
        j = j + 1;
      }
      i = i + 1;
    }
    i = 1;
    int s1 = 0, s2 = 0;
    while (i <= n) {
      s1 = s1 + b[i][0];
      s2 = s2 + b[i][1];
      i = i + 1;
    }
    int k1, k2, z;
    if ((s1 == n) || (s2 == n)) {
      if (s1 == n) {
        k1 = 1;
        while (k1 <= n) {
          k2 = 1;
          z = 0;
          while ((k2 <= n) && (z == 0)) {
            if (a[k1][k2] == '.') {
              cout << k1 << " " << k2 << endl;
              z = 1;
            }
            k2 = k2 + 1;
          }
          k1 = k1 + 1;
        }
      } else if (s2 == n) {
        k2 = 1;
        while (k2 <= n) {
          k1 = 1;
          z = 0;
          while ((k1 <= n) && (z == 0)) {
            if (a[k1][k2] == '.') {
              cout << k1 << " " << k2 << endl;
              z = 1;
            }
            k1 = k1 + 1;
          }
          k2 = k2 + 1;
        }
      }
    } else
      cout << "-1" << endl;
  }
}
