#include <bits/stdc++.h>
using namespace std;
char mp[105][105];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) {
      scanf("%s", mp[i] + 1);
    }
    bool ok = false;
    for (int i = 1; i <= n; i++) {
      ok = false;
      for (int j = 1; j <= n; j++) {
        if (mp[i][j] == '.') {
          ok = true;
          break;
        }
      }
      if (ok == false) {
        break;
      }
    }
    if (ok == true) {
      for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
          if (mp[i][j] == '.') {
            printf("%d %d\n", i, j);
            break;
          }
        }
      }
      return 0;
    }
    for (int j = 1; j <= n; j++) {
      ok = false;
      for (int i = 1; i <= n; i++) {
        if (mp[i][j] == '.') {
          ok = true;
          break;
        }
      }
      if (ok == false) {
        break;
      }
    }
    if (ok == true) {
      for (int j = 1; j <= n; j++) {
        for (int i = 1; i <= n; i++) {
          if (mp[i][j] == '.') {
            printf("%d %d\n", i, j);
            break;
          }
        }
      }
      return 0;
    }
    puts("-1");
  }
  return 0;
}
