#include <iostream>
using namespace std;
#define rep(i,n,b) for(int i=b;i<n;i++)
int main(){
	int n;
	
	
	char mt[1000][1000];

	while( cin >> n , n){
		int ret = 0;

			rep(i,n,0)rep(j,n,0)cin >> mt[i][j];
	
		rep(i,n,0)rep(j,n,0){
		
			if(mt[i][j] == '.'){
			
				ret = max(ret,1);
				
				bool flag = true;
				rep(sz,n-max(i,j),1){
					rep(x,sz+1,0){if(mt[i+sz][j+x] == '*'){flag = false;break;}}
					rep(y,sz+1,0){if(mt[i+y][j+sz] == '*'){flag = false;break;}}
					if(!flag){break;}
					ret = max(ret,sz+1); 
				}
			}
		}
		cout << ret << endl;
	}
}