#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
ifstream fin("input.txt");
ofstream fout("output.txt");
long long fast_exp(long long base, long long exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp /= 2;
  }
  return res % 1000000007;
}
int palindromecheck(string s) {
  int n = s.size();
  for (int i = 0; i < n / 2; ++i) {
    if (s[i] != s[n - i - 1]) {
      return 0;
    }
  }
  return 1;
}
int gcd(int a, int b) {
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
int val(char c) {
  if (c >= '0' && c <= '9')
    return (int)c - '0';
  else
    return (int)c - 'A' + 10;
}
long long pows(int a, int b) {
  long long res = 1;
  for (int i = 0; i < b; ++i) {
    res *= a;
  }
  return res;
}
long long logx(long long base, long long num) {
  int cnt = 0;
  while (num != 1) {
    num /= base;
    ++cnt;
  }
  return cnt;
}
long long divisibles(long long a, long long b, long long m) {
  if (a % m == 0)
    return (b / m) - (a / m) + 1;
  else
    return (b / m) - (a / m);
}
string bitstring(int n, int size) {
  string s;
  while (n) {
    s += (n % 2) + '0';
    n /= 2;
  }
  while (s.size() < size) {
    s += '0';
  }
  reverse(s.begin(), s.end());
  return s;
}
vector<int> vis(200001, 0);
vector<int> adj[200001];
int arr[100][100];
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<pair<int, int>> colwise, rowise;
  for (int i = 0; i < n; ++i) {
    int flag = 0;
    for (int j = 0; j < n; ++j) {
      char c;
      cin >> c;
      if (c == '.') {
        arr[i][j] = 0;
        if (flag == 0) {
          flag = 1;
          rowise.push_back({i + 1, j + 1});
        }
      } else
        arr[i][j] = 1;
    }
  }
  for (int c = 0; c < n; ++c) {
    for (int r = 0; r < n; ++r) {
      if (arr[r][c] == 0) {
        colwise.push_back({r + 1, c + 1});
        break;
      }
    }
  }
  if (colwise.size() < n && rowise.size() < n) {
    cout << -1 << "\n";
  } else {
    if (colwise.size() == n) {
      for (auto x : colwise) cout << x.first << " " << x.second << "\n";
    } else {
      for (auto x : rowise) cout << x.first << " " << x.second << "\n";
    }
  }
}
