#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main( void )
{

	int n;
	while ( cin >> n && n )
	{
		vector <string> M(n);
		for ( int i = 0; i < n; i++ )
		{
			cin >> M[i];
		}

		int kotae = 0;
		int cnt = 1;
		while ( cnt <= n )
		{
			bool found = false;
			for ( int i = 0; !found && i < n; i++ ) for ( int j = 0 ; !found && j < n; j++ )
			{
				if ( M[i][j] == '*' )
					continue;

				if ( j+cnt-1 >= n || i+cnt-1 >= n )
					continue;

				bool ok = true;
				for ( int y = 0; ok && y < cnt; y++ ) for ( int x = 0; ok && x < cnt; x++ )
				{
					if ( M[i+y][j+x] == '*' )
						ok = false;
				}

				if ( ok )
					found = true;
			}

			if ( found )
			{
				kotae = cnt;
			}
			else
			{
				break;
			}

			cnt++;
		}

		cout << kotae << endl;

	}

	return 0;
}