#include<iostream>
#include<string>
#include<vector>

using namespace std;

int SquareSearching(vector<string>, int, int);
int Searching1(vector<string>, int, int, int);
int Searching2(vector<string>, int, int, int);

int main(){
  int i, j, n, length, _length;
  string str;
  vector<string> Square;

  while(1){
    cin >> n;
    if(n == 0) break;

    for(i=0; i<n; ++i){
      cin >> str;
      Square.push_back(str);
    }

    for(i=0, length=0; i<n; ++i){
      for(j=0; j<n; ++j){
        if(Square[i][j] == '.'){
          _length = SquareSearching(Square, i, j);
          if(length < _length) length = _length;
        }
      }
    }

    cout << length << endl;
    Square.clear();
  }

  return 0;
}

int SquareSearching(vector<string> s, int n, int m){
  int i=1, count=1;
  while(1){    
    if(n+i==s.size() || m+i==s.size() || Searching1(s, n, n+i, m+i)==1 || Searching2(s, m, m+i, n+i)==1) break;
    ++i;
    ++count;
  }
  return count;
}

int Searching1(vector<string> s, int n, int m, int j){
  int i;
  for(i=n; i<=m; ++i){
    if(s[i][j] == '*') return 1;
  }
  return 0;
}

int Searching2(vector<string> s, int n, int m, int i){
  int j;
  for(j=n; j<=m; ++j){
    if(s[i][j] == '*') return 1;
  }
  return 0;
}