func_code_string: #include <bits/stdc++.h>   using namespace std;   int main(int argc, char const *argv[]) {     int n;     char s[105][105];     while (~scanf( %d , &n)) {       for (int i = 1; i <= n; ++i) scanf( %s , s[i] + 1);       vector<pair<int, int> > r;       bool rc = true;       for (int i = 1; i <= n; ++i) {         int j;         for (j = 1; j <= n; ++j)           if (s[i][j] ==  . ) {             r.push_back(pair<int, int>(i, j));             break;           }         if (j > n) {           rc = false;           break;         }       }       vector<pair<int, int> > c;       bool cc = true;       for (int j = 1; j <= n; ++j) {         int i;         for (i = 1; i <= n; ++i)           if (s[i][j] ==  . ) {             c.push_back(pair<int, int>(i, j));             break;           }         if (i > n) {           cc = false;           break;         }       }       if (rc) {         for (int i = 0; i < n; ++i) printf( %d %d n , r[i].first, r[i].second);       } else if (cc) {         for (int i = 0; i < n; ++i) printf( %d %d n , c[i].first, c[i].second);       } else {         puts( -1 );       }     }     return 0;   }   