#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > a, b;
pair<int, int> x;
int co, ot, n, m, d;
char s;
int r, c, ma[100][100];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cin >> s;
      if (s == 'E') ma[i][j] = 1;
    }
  }
  for (int i = 0; i < n; ++i) {
    int q = 0;
    for (int j = 0; j < n; ++j) {
      if (ma[i][j]) continue;
      q = 1;
      x.first = i;
      x.second = j;
      a.push_back(x);
      break;
    }
    if (q) continue;
    d = 1;
    break;
  }
  if (!d) {
    for (int i = 0; i < a.size(); ++i) {
      cout << a[i].first + 1 << ' ' << a[i].second + 1 << endl;
    }
  } else {
    for (int j = 0; j < n; ++j) {
      int q = 0;
      for (int i = 0; i < n; ++i) {
        if (ma[i][j]) continue;
        q = 1;
        x.first = i;
        x.second = j;
        b.push_back(x);
        break;
      }
      if (q) continue;
      cout << -1;
      return 0;
    }
    for (int i = 0; i < b.size(); ++i) {
      cout << b[i].first + 1 << ' ' << b[i].second + 1 << endl;
    }
  }
}
