#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int size(const T& c) {
  return c.size();
}
using namespace std;
const int maxn = 100 + 10;
int n;
string a[maxn];
int r[maxn];
int c[maxn];
int main() {
  string temp;
  cin >> n;
  getline(cin, temp);
  for (int i = (0), _b = (n - 1); i <= _b; i++)
    getline(cin, a[i]), r[i] = -1, c[i] = -1;
  for (int i = (0), _b = (n - 1); i <= _b; i++)
    for (int j = (0), _b = (n - 1); j <= _b; j++) {
      if (a[i][j] == '.') r[i] = j, c[j] = i;
    }
  bool ok = true;
  for (int i = (0), _b = (n - 1); i <= _b; i++)
    if (r[i] == -1) ok = false;
  if (ok) {
    for (int i = (0), _b = (n - 1); i <= _b; i++)
      cout << i + 1 << ' ' << r[i] + 1 << endl;
    return 0;
  }
  ok = true;
  for (int i = (0), _b = (n - 1); i <= _b; i++)
    if (c[i] == -1) ok = false;
  if (ok) {
    for (int i = (0), _b = (n - 1); i <= _b; i++)
      cout << c[i] + 1 << ' ' << i + 1 << endl;
    return 0;
  }
  cout << -1;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
