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

int min3(int a, int b, int c){
    if( a < b ) return a < c ? a : c;
    return b < c ? b : c;
}

struct trio{
    int up;
    int left;
    int ver;
    trio(int a, int b, int c) : up(a), left(b), ver(c) {}
};


int main(){
    int n;
    while( cin >> n, n ){
        vector< string > board(n);
        vector< vector< trio > > dp(n, vector< trio >(n, trio(0,0,0)));
        for(int i = 0; i < n; i++){
            cin >> board[i];
        }
        int max_ver = 0;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < n; j++){
                if( board[i][j] == '*' ) continue;
                if( i ) dp[i][j].up = dp[i-1][j].up + 1;
                else dp[i][j].up = 1;
                if( j ) dp[i][j].left = dp[i][j-1].left + 1;
                else dp[i][j].left = 1;
                if( i*j ) dp[i][j].ver = min3(dp[i-1][j-1].ver + 1,
                                              dp[i-1][j].up + 1,
                                              dp[i][j-1].left + 1);
                else dp[i][j].ver = 1;
                if( dp[i][j].ver > max_ver ){
                    max_ver = dp[i][j].ver;
                }
            }
        }
        cout << max_ver << endl;
    }
    return 0;
}