#include <bits/stdc++.h>
using namespace std;
char mat[105][105];
int row[105], col[105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (int)n; i++) scanf("%s", mat[i]);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (mat[i][j] == '.') {
        row[i]++;
        col[j]++;
      }
    }
  }
  int rr = 1, cc = 1;
  for (int i = 0; i < n; i++) {
    if (!row[i]) rr = 0;
    if (!col[i]) cc = 0;
  }
  if (!cc && !rr) return cout << -1 << endl, 0;
  if (rr) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (mat[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    }
  } else
    for (int j = 0; j < n; j++) {
      for (int i = 0; i < n; i++) {
        if (mat[i][j] == '.') {
          cout << i + 1 << " " << j + 1 << endl;
          break;
        }
      }
    }
  return 0;
}
