#include <bits/stdc++.h>
using namespace std;
int n, m, ma[110], mb[110];
char g[110][110];
int main() {
  cin >> n;
  m = n;
  for (int i = 0; i < (n); i++) cin >> g[i];
  memset(ma, 0, sizeof(ma));
  memset(mb, 0, sizeof(mb));
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++)
      if (g[i][j] == '.') ma[i] = mb[j] = 1;
  int flag = 1;
  for (int i = 0; i < (n); i++)
    if (ma[i] == 0) {
      flag = 0;
      break;
    }
  if (flag) {
    for (int i = 0; i < (n); i++)
      for (int j = 0; j < (m); j++)
        if (g[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
  } else {
    flag = 1;
    for (int i = 0; i < (m); i++)
      if (mb[i] == 0) {
        flag = 0;
        break;
      }
    if (flag) {
      for (int j = 0; j < (m); j++)
        for (int i = 0; i < (n); i++)
          if (g[i][j] == '.') {
            cout << i + 1 << " " << j + 1 << endl;
            break;
          }
    } else {
      cout << "-1" << endl;
    }
  }
  return 0;
}
