#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>


#define CI cin >>
#define CO cout <<
#define E << endl;
#define F(i,max) (for(int i = 0;i < max;++i))

using namespace std;

vector <vector<char>> map;
int n = 0;
int size_max = 0;


void input() {
	CI n;

	map.resize(n);
	for (int i = 0; i < n; ++i) {
		map[i].resize(n);
	}

	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			CI map[i][j];
		}
	}

}

void dfs() {
	int size = 0;
	
	bool flag_equal = true;

	for (int i = 0; i < n; ++i) {
		if (size_max > n - i) {
			break;
		}
		for (int j = 0; j < n; ++j) {
			if (size_max > n - j) {
				break;
			}

			if (map[i][j] == '.') {
				size = 0;
				size++;
				for (int k = j + 1, v = i + 1; k < n && v < n;++k,++v) {
					for (int l = i; l < i + size + 1 && l < n; ++l) {
						if (map[l][k] != '.') {
							flag_equal = false;
							break;
						}
					}
					if (flag_equal == false) {
						break;
					}
					for (int m = j; m < j + size + 1 && m < n; ++m) {
						if (map[v][m] != '.') {
							flag_equal = false;
							break;
						}
					}
					if (flag_equal == false) {
						break;
					}
					size++;
				}
				
			
				if (size > size_max) {
					size_max = size;
					
				}
				size = 0;
				flag_equal = true;
			}


		}
	}
}


int main(void) {
	while (true) {
		input();
		if (n == 0) {
			break;
		}
		dfs();
		CO size_max E
		size_max = 0;
	}
	

	

	
	return 0;
}