#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e2 + 5;
int n, grid[N][N];
bool col[N], row[N];
vector<pair<int, int> > ans;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  memset(col, false, sizeof(col));
  memset(row, false, sizeof(row));
  cin >> n;
  for (long long int i = (1); i <= (n); i++) {
    for (long long int j = (1); j <= (n); j++) {
      char tempc;
      cin >> tempc;
      grid[i][j] = (tempc == '.' ? 0 : 1);
      if (tempc == '.') {
        row[i] = col[j] = true;
      }
    }
  }
  bool isRow = false, isCol = false;
  for (long long int i = (1); i <= (n); i++) {
    if (!row[i]) isRow = true;
    if (!col[i]) isCol = true;
  }
  if (!isRow) {
    for (long long int i = (1); i <= (n); i++) {
      for (long long int j = (1); j <= (n); j++) {
        if (!grid[i][j]) {
          cout << i << " " << j << endl;
          break;
        }
      }
    }
  } else if (!isCol) {
    for (long long int j = (1); j <= (n); j++) {
      for (long long int i = (1); i <= (n); i++) {
        if (!grid[i][j]) {
          cout << i << " " << j << endl;
          break;
        }
      }
    }
  } else
    cout << "-1" << endl;
  return 0;
}
