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

int main(){
	int i, j, k, l, n, cnt, max;
	int cntj,cnti;
	string str;
	while(true){
		cin>>n; if(n==0) break;
		max=0;
		vector<vector<int> > field(n, vector<int>(n));
		for(i=0;i<n;i++){
			cin>>str;
			for(j=0;j<n;j++){
				if(str[j]=='.')field[i][j]=0;
				if(str[j]=='*')field[i][j]=1;
			}
		}
		for(i=0;i<n;i++){
			for(j=0;j<n;j++){
				if(field[i][j] == 0){
					cnt=1;
					while(true){
						cntj=cnt+j;
						cnti=cnt+i;
						//cout<<"while cnt="<<cnt<<" field["<<i<<"]["<<j<<"]"<<endl;
						if(cnti>=n || cntj>=n) break;
						for(k=0;k<=cnt;k++){//yoko
							//cout<<"field["<<cnti<<"][_"<<k+j<<"]="<<field[cnti][k+j]<<endl;
							if(field[cnti][k+j] == 1) break;
						}
						if(k!=cnt+1) break;
						for(k=0;k<=cnt;k++){//tate
							//cout<<"field["<<k+i<<"]["<<cntj<<"]="<<field[k+i][cntj]<<endl;
							if(field[k+i][cntj] == 1) break;
						}
						if(k!=cnt+1) break;
						cnt++;
					}
					//if(max<cnt)cout<<"max=cnt="<<cnt<<endl;
					if(max<cnt) max=cnt;
				}
			}
		}
		cout<<max<<endl;
	}
	return 0;
}