#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 6;
const long long M = 1e9 + 1;
char mat[105][105];
void solve() {
  long long n;
  cin >> n;
  long long row[n];
  vector<pair<long long, long long> > vecr;
  vector<pair<long long, long long> > vecc;
  long long col[n];
  memset(row, 0, sizeof(row));
  memset(col, 0, sizeof(col));
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      cin >> mat[i][j];
      if (mat[i][j] == '.') {
        if (row[i] != 1) vecr.push_back({i, j});
        row[i] = 1;
        if (col[j] != 1) vecc.push_back({i, j});
        col[j] = 1;
      }
    }
  }
  bool rowok = true;
  bool colok = true;
  for (long long i = 0; i < n; i++) {
    if (row[i] == 0) rowok = false;
    if (col[i] == 0) colok = false;
  }
  if (!rowok && !colok)
    cout << -1;
  else if (rowok) {
    for (long long i = 0; i < vecr.size(); i++)
      cout << vecr[i].first + 1 << " " << vecr[i].second + 1 << "\n";
  } else if (colok) {
    for (long long i = 0; i < vecc.size(); i++)
      cout << vecc[i].first + 1 << " " << vecc[i].second + 1 << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) solve();
}
