#include <bits/stdc++.h>
using namespace std;
int n;
char ch;
vector<pair<int, int>> ansLin, ansCol;
bool visLin[101], visCol[101];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      cin >> ch;
      if (ch == '.' && !visCol[j]) {
        visCol[j] = true;
        ansCol.push_back({i, j});
      }
      if (ch == '.' && !visLin[i]) {
        visLin[i] = true;
        ansLin.push_back({i, j});
      }
    }
  if (ansCol.size() == n)
    for (int i = 0; i < n; i++)
      cout << ansCol[i].first << ' ' << ansCol[i].second << '\n';
  else if (ansLin.size() == n)
    for (int i = 0; i < n; i++)
      cout << ansLin[i].first << ' ' << ansLin[i].second << '\n';
  else
    cout << "-1";
  return 0;
}
