#include <bits/stdc++.h>
using namespace std;
string nm[105];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<int, int> > v;
  int check = 0;
  for (int i = 0; i < n; i++) cin >> nm[i];
  for (int i = 0; i < n; i++) {
    int ans = 0, k = 0;
    for (int j = 0; j < n; j++) {
      if (nm[i][j] == '.' && k == 0) {
        v.push_back(make_pair(i + 1, j + 1));
        k = 1;
      } else
        ans++;
    }
    if (ans == n) {
      check = 1;
    }
  }
  if (check == 0) {
    for (int i = 0; i < v.size(); i++) {
      cout << v[i].first << " " << v[i].second << "\n";
    }
    return 0;
  }
  v.clear();
  for (int j = 0; j < n; j++) {
    int ans = 0, k = 0;
    for (int i = 0; i < n; i++) {
      if (nm[i][j] == '.' && k == 0) {
        v.push_back(make_pair(i + 1, j + 1));
        k = 1;
      } else
        ans++;
    }
    if (ans == n) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << "\n";
  }
  return 0;
}
