#include <bits/stdc++.h>
using namespace std;
int row[101];
int column[101];
char a[101][101];
int main(int argc, char *argv[]) {
  int n = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> a[i][j];
      if (a[i][j] == '.') {
        row[i]++;
        column[j]++;
      }
    }
  }
  bool rowHasRet = true;
  for (int i = 1; i <= n; i++) {
    if (row[i] == 0) {
      rowHasRet = false;
      break;
    }
  }
  bool columnHasRet = true;
  for (int i = 1; i <= n; i++) {
    if (column[i] == 0) {
      columnHasRet = false;
      break;
    }
  }
  if (!rowHasRet && !columnHasRet) {
    cout << -1;
    return 0;
  }
  if (rowHasRet) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (a[i][j] == '.') {
          cout << i << " " << j << endl;
          break;
        }
      }
    }
  }
  if (!rowHasRet && columnHasRet) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (a[j][i] == '.') {
          cout << j << " " << i << endl;
          break;
        }
      }
    }
  }
  return 0;
}
