Buggy python submission (verdict: Runtime Error):
while True:
    n = input()
    if n==0:
        break
    data=[]
    for i in range(n):
        data.append(raw_input())
    solve=0
    for i in range(n):
        if i+solve<n:
            for j in range(n):
                if j+solve<n:
                    while True:
                        flag=0
                        for a in range(solve+1):
                            for b in range(solve+1):
                                if data[i+a][j+b]=="*":
                                    flag=1
                                    break
                            if flag==1:
                                break
                        if flag==0:
                            solve+=1
                        else:
                            break
                else:
                    break
        else:
            break
    print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n = input()
    if n==0:
        break
    data=[]
    for i in range(n):
        data.append(raw_input())
    solve=0
    for i in range(n):
        if i+solve<n:
            for j in range(n):
                if j+solve<n:
                    while True:
                        flag=0
                        for a in range(solve+1):
                            for b in range(solve+1):
                                if data[i+a][j+b]=="*":
                                    flag=1
                                    break
                            if flag==1:
                                break
                        if flag==0:
                            solve+=1
                            if i+solve>=n or j+solve>=n: 
                                break
                        else:
                            break
                else:
                    break
        else:
            break
    print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Runtime Error):
while True:
    n = input()
    if n==0:
        break
    data=[]
    for i in range(n):
        data.append(raw_input())
    d=[[1 for i in range(n)]for j in range(n)]
    solve=0
    for i in range(n):
        if i+solve<n:
            for j in range(n):
                if j+solve<n:
                    if d[i][j]!=0:
                        while True:
                            flag=0
                            for a in reversed(range(solve+1)):
                                for b in reversed(range(solve+1)):
                                    if data[i+a][j+b]=="*":
                                        for v in range(a+1):
                                            for w in range(b+1):
                                                d[i+v][j+w]=0
                                        flag=1
                                        break
                                if flag==1:
                                    break
                            if flag==0:
                                solve+=1
                                if i+solve>=n or j+solve>=n: 
                                    break
                            else:
                                break
                else:
                    break
        else:
            break
    print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
            j+=1
    while True:
        flag=0
        for y in range(n-1):
            for x in range(n-1):
                if dp[y][x]!=0:
                    old=dp[y][x]
                    dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                    if old!=dp[y][x]:
                        flag=1
        if flag==0:
            break
    allmax=0
    for i in range(n):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                flag0=1
                dp[i][j]=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in range(n-1):
                for x in range(n-1):
                    if dp[y][x]!=0:
                        old=dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if old!=dp[y][x]:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                flag0=1
                dp[i][j]=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in range(n-solve):
                for x in range(n-solve):
                    if dp[y][x]!=0:
                        old=dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if old!=dp[y][x]:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in range(n-solve):
                for x in range(n-solve):
                    if dp[y][x]==solve:
                        old=dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if old !=dp[y][x]:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in xrange(n-solve):
                for x in xrange(n-solve):
                    if dp[y][x]==solve:
                        old=dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if old !=dp[y][x]:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in xrange(n-solve):
                for x in xrange(n-solve):
                    if dp[y][x]==solve and dp[y+1][x]==solve and\
                       dp[y][x+1]==solve and dp[y+1][x+1]==solve:
                        dp[y][x]=solve+1
                        flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in xrange(n-1):
                for x in xrange(n-1):
                    if dp[y][x]==solve and dp[y+1][x]==solve and\
                       dp[y][x+1]==solve and dp[y+1][x+1]==solve:
                        dp[y][x]=solve+1
                        flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in xrange(n-1):
                for x in xrange(n-1):
                    if dp[y][x]!=0:
                        old = dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if old!=dp[y][x]:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax

Buggy python submission (verdict: Time Limit Exceeded):
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n)]for j in range(n)]
    flag0=0
    for i in range(n):
        j=0
        for c in raw_input():
            if c == ".":
                dp[i][j]=1
                flag0=1
            j+=1
    if flag0==0:
        print 0
    else:
        solve=1
        while True:
            flag=0
            for y in xrange(n-1):
                for x in xrange(n-1):
                    if dp[y][x]!=0:
                        old = dp[y][x]
                        dp[y][x]=min(dp[y+1][x],dp[y][x+1],dp[y+1][x+1])+1
                        if dp[y][x]-old==1:
                            flag=1
            if flag==0:
                break
            solve+=1
        print solve

Fixed submission:
while True:
    n=input()
    if n==0:
        break
    dp=[[0 for i in range(n+1)]for j in range(n+1)]
    for i in range(1,n+1):
        j=0
        line=" "+raw_input()
        for c in line:
            if c == ".":
                dp[i][j]=min(dp[i-1][j],dp[i][j-1],dp[i-1][j-1])+1
            j+=1
    allmax=0
    for i in range(n+1):
        if allmax<max(dp[i]):
            allmax=max(dp[i])
    print allmax