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

int main() {
  int H,x,top;
  string field[500];
  string str;
  while(cin >> H) {
    getline(cin,str);// kill \n
    int surface[500][500] = {0};
    string field[500] = {""};
    if((H == 0)) break;

    for(int i=0;i<H;i++) { //get field for string
      getline(cin,str);
      field[i] = str;
    }
    for(int i=0;i<H;i++) { // calc surface[i][j] (square has vertex.field[i][j])長方形のつくりかたがおもいつかない
      for(int j=0;j<H;j++) {

        if(field[i].substr(j,1) == ".") {
          x=1;bool r = true;
          while(r) {

            if(H-1<i+x || H-1<j+x) break;

            for(int i1=0;i1<=x;i1++) {
              for(int j1=0;j1<=x;j1++) {
                if(field[i+i1].substr(j+j1,1) != ".") {
                  r = false;
                }
                else {
                  continue;
                }
              }
            }
            if(r) {
              x++;
            }
          }
        }
        else {
          x=0;
        }
        surface[i][j] = x;
      }
    }

    top = surface[0][0];
    for(int i=0;i<H;i++) {
      for(int j=0;j<H;j++) {
        if(top <= surface[i][j])
          top = surface[i][j];
      }
    }
    cout << top << endl; // for test
  }
}