#include <iostream>
#include <cstdio>
using namespace std;
#define MAX(A, B) ((A) > (B)? (A): (B))
#define MIN(A, B) ((A) < (B)? (A): (B))

int search(int x, int y, int pat);

int n;
bool tront[1000][1000];

int main() {
	int i, j;

	while (1) {
		int max = 0;
		cin >> n;
		getchar();
		if (n == 0)
			break;
		for (i = 0; i < n; i++) {
			char str[1001];
			gets(str);
			for (j = 0; j < n; j++) {
				switch (str[j]) {
				case '.':
					tront[i][j] = 0;
					break;
				case '*':
					tront[i][j] = 1;
					break;
				}
			}
		}
		for (i = 0; i < n; i++) {
			for (j = 0; j < n; j++) {
				if (!tront[i][j]) {
					int kmax = search(i, j, 0);
					max = MAX(max, kmax);
				}
			}
		}
		cout << max << endl;
	}
	return 0;
}

int search(int x, int y, int pat) {
	int cx = 1, cy = 1, cxy = 1;

	if (x >= n || y >= n || tront[x][y])
		return 0;
	switch (pat) {
	case 0:
		cx += search(x+1, y, 1);
		cy += search(x, y+1, 2);
		cxy += search(x+1, y+1, 0);
		return MIN(cx, MIN(cy, cxy));
		break;

	case 1:
		cx += search(x+1, y, 1);
		return cx;
		break;

	case 2:
		cy += search(x, y+1, 2);
		return cy;
		break;
	}
}