#include <bits/stdc++.h>
using namespace std;
int row[105], column[105];
char str[105][105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%s", str[i] + 1);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (str[i][j] == '.') {
        row[i] = column[j] = 1;
      }
    }
  }
  bool roww = true, columnn = true;
  for (int i = 1; i <= n; i++) {
    if (row[i] == 0) roww = false;
    if (column[i] == 0) columnn = false;
  }
  vector<pair<int, int> > vec;
  if (!roww && !columnn)
    printf("-1\n");
  else if (roww) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (str[i][j] == '.') {
          vec.push_back(make_pair(i, j));
          break;
        }
      }
    }
  } else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (str[j][i] == '.') {
          vec.push_back(make_pair(j, i));
          break;
        }
      }
    }
  }
  for (int i = 0; i < vec.size(); i++)
    printf("%d %d\n", vec[i].first, vec[i].second);
  return 0;
}
