#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 100 + 5;
int maze[N][N], cntr[N], cntc[N];
int main() {
  int n;
  while (cin >> n) {
    ;
    memset(maze, 0, sizeof(maze));
    ;
    ;
    memset(cntr, 0, sizeof(cntr));
    ;
    ;
    memset(cntc, 0, sizeof(cntc));
    ;
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) {
        char ch;
        cin >> ch;
        if (ch == '.') {
          cntr[i] = 1;
          cntc[j] = 1;
        } else
          maze[i][j] = 1;
      }
    int t1 = 0, t2 = 0;
    for (int i = 1; i <= n; ++i) {
      if (cntr[i]) t1++;
      if (cntc[i]) t2++;
    }
    if (t1 == n) {
      for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
          if (!maze[i][j]) {
            cout << i << " " << j << endl;
            break;
          }
        }
      }
    } else if (t2 == n) {
      for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
          if (!maze[j][i]) {
            cout << j << " " << i << endl;
            break;
          }
        }
      }
    } else
      cout << "-1" << endl;
  }
  return 0;
}
