#include <bits/stdc++.h>   using namespace std;   int N;   char field[110][110];   bool check_solution(bool do_print, bool swapped) {     for (int r = 0; r < N; ++r) {       int c;       for (c = 0; c < N; ++c) {         if (field[r][c] ==  . ) break;       }       if (c == N) return false;       if (do_print) {         if (swapped)           printf( %d %d n , c + 1, r + 1);         else           printf( %d %d n , r + 1, c + 1);       }     }     return true;   }   int main(void) {     scanf( %d , &N);     for (int r = 0; r < N; ++r) scanf( %s , field[r]);     if (check_solution(false, false)) {       check_solution(true, false);     } else {       for (int r = 0; r < N; ++r) {         for (int c = r + 1; c < N; ++c) {           swap(field[r][c], field[c][r]);         }       }       if (check_solution(false, true))         check_solution(true, true);       else         puts( -1 );     }     return 0;   }   