#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;

int n,dp[1001][1001];
char mas[1001][1001];
int maxi;

void dynamic_p(int j,int i){
  dp[i][j] = 1;
  for(int x=0;x<n;x++) dp[i][x] = 1;
  for(int x=0;x<n;x++) dp[x][j] = 1;
  for(i=i+1;i<n;i++){
    for(j=j+1;j<n;j++){
      if(mas[i][j]!='.'||mas[i][j]!='.'||mas[i][j]!='.') dp[i][j] = 0;
      else dp[i][j] = dp[i-1][j] + dp[i][j-1];
      maxi = (maxi,dp[i][j]);
    }
  }
}

int main(){
  while(cin >> n,n){
    maxi = -1;
    memset(dp,0,sizeof(dp));
    for(int i=0;i<n;i++){
      for(int j=0;j<n;j++) cin >> mas[i][j];
    }
    for(int i=0;i<n;i++){
      for(int j=0;j<n;j++){
	if(mas[i][j] == '.'){
	  memset(dp,0,sizeof(dp));
	  dynamic_p(j,i);
	}
      }
    }
    cout << maxi + 1 << endl;
  }
}