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

int fitSquareSize( int n, int y, int x, char* table, bool* checked ){
	int size;
	bool end = false;
	for( size = 1; ; ++size ){
		for( int i = 0; i < size; ++i ){
			if( table[ ( y + (size-1) ) * (n+1) + ( x + i ) ] == '*' ||
				table[ ( y + i ) * (n+1) + x + (size-1) ] == '*' ){
				end = true;
				break;
			}
		}
		if( end ){
			break;
		}
		checked[ y * (n+1) + x + (size-1) ] = true;
	}
	return size-1;
}

int main(){
	int n;
	while( cin >> n && n ){
		char* table = new char[ (n+1) * (n+1) ];
		bool* checked = new bool[ (n+1) * (n+1) ]();
		int sizeMax = 0;
		for( int i = 0; i < n; ++i ){
			for( int j = 0; j < n; ++j ){
				char c;
				cin >> c;
				int index = i * (n+1) + j;
				table[ index ] = c;
				if( c =='*' ){
					checked[ index ] = true;
				}
			}
			table[ i * (n+1) + n ] = '*';
			checked[ i * (n+1) + n ] = true;
		}
		for( int i = 0; i < n+1; ++i ){
			int index = n * (n+1) + i;
			table[ index ] = '*';
			checked[ index ] = true;
		}
		for( int i = 0; i < n; ++i ){
			for( int j = 0; j < n; ++j ){
				if( checked[ i * (n+1) + j ] ) continue;
				sizeMax = max( fitSquareSize( n, i, j, table, checked ), sizeMax );
			}
		}

		cout << sizeMax << endl;

		delete[] table;
		delete[] checked;
	}
}