#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main() {
	int n;

	while (cin >> n) {
		if (n == 0) {
			break;
		}
		vector< vector<char> > d(n, vector<char>(n));
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				cin >> d[i][j];
			}
		}
		int c = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				if (d[i][j] == '.') {
					c = max(c, 1);
					if (n-1-i < c || n-1-j < c) {
						break;
					}
					for (int k = 1; i+k < n && j+k < n;  k++) {
						bool h = true;
						//if (i == 1 && j == 3)cout << "b " << i << ' ' << j << endl;
						for (int p = i; p <= i+k; p++) {
							//if (i == 1 && j == 3)cout << p << ' ' << j+k << endl;
							if (d[p][j+k] == '*') {
								//if (i == 1 && j == 3)cout << 'a' << endl;
								h = false;
								break;
							}
						}
						for (int p = j; p <= j+k; p++) {
							//if (i == 1 && j == 3)cout << i+k << ' ' << p << endl;
							if (d[i+k][p] == '*') {
								j = p;
								//if (i == 1 && j == 3)cout << 'a' << endl;
								h = false;
								break;
							}
						}
						if (h) {
							/*if (k == 6) {
								cout << i << ' ' << j << endl;
							}*/
							//cout << endl;
							c = max(c, k+1);
						} else {
							break;
						}
					}
				}
			}
		}
		cout << c << endl;
	}

	return 0;
}