#include <iostream>
#include <string>
using namespace std;

bool find_s(string s[1000], int i, int n){
	for(int j = 0; j <= n - i; j++){
		for(int k = 0; k <= n - i; k++){
			cout << j << " " << k << endl;
			int count = 0;
			if(s[j][k] == '.')
				for(int l = 0; l < i; l++)
					for(int m = 0; m < i; m++)
						if(s[j+l][k+m] == '.') count++;
			if(count == i * i) return true;
		}
	}
	return false;
}

int main(){
	int n;
	const int max = 1000;
	string s[max];
	while(cin >> n){
		if(n == 0) break;
		for(int i = 0; i < n; i++){
			cin >> s[i];
		}
		int c = 0;
		for(int i = 1; i <= n; i++){
			cout << i << endl;
			if(find_s(s,i,n)){
				c = i;
			}else{
				break;
			}
		}
		cout << c << endl;
	}
	return 0;
}