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

int n;
struct square{
  int x,y,w,h;
  square(int x,int y,int w,int h):x(x),y(y),w(w),h(h){}
};
bool iscorrect(const vector<string> &field,const square &s){
  if(s.x+s.w>=n||s.y+s.h>=n)return false;
  for(int j=s.y;j<s.y+s.h;++j){
    for(int i=s.x;i<s.x+s.w;++i){
      if(field[j][i]=='*')return false;
    }
  }
  return true;
}
unsigned squaresize(const vector<string> &field,int i,int j){
  square s(j,i,1,1);
  while(iscorrect(field,square(s.x,s.y,s.w+1,s.h+1))){
    s.w++;
    s.h++;
  }
  return s.w;
}
unsigned searchsquare(vector<string> field){
  int maxsize=0;
  for(int i=0;i<n;++i){
    for(int j=0;j<n;++j){
      if(field[i][j]=='*')continue;
      int size=squaresize(field,i,j);
      if(size>maxsize)maxsize=size;
    }
  }
  return maxsize;
}
int main(){
  while(cin>>n&&n){
    vector<string> field(n);
    for(int i=0;i<n;++i){
      cin>>field[i];
    } 
    std::cout<<searchsquare(field)<<endl;
  }

}