Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
H,W=map(int,input().split())
S=[]
for i in range(H):
    s=input()
    s1=[]
    for j in range(W):
        if s[j]=='.':
            s1+=[1]
        else:
            s1+=[0]
    S+=[s1]
S=np.array(S)

T1=[]
for i in range(H):
    s=S[i]
    t2=s[0]
    if t2==1:
        t1=1
    else:
        t1=0
    t=[]
    k=0
    for j in range(1,W):
        if s[j]==t2:
            if t2==1:
                t1+=1
        else:
            t2=s[j]
            t+=[t1]*(j-k)
            k=j
            if t2==1:
                t1=1
            else:
                t1=0
    else:
        t+=[t1]*(W-k)
    T1+=[t]
T1=np.array(T1)


T2=[]
for i in range(W):
    s=S.T[i]
    t2=s[0]
    if t2==1:
        t1=1
    else:
        t1=0
    t=[]
    k=0
    for j in range(1,H):
        if s[j]==t2:
            if t2==1:
                t1+=1
        else:
            t2=s[j]
            t+=[t1]*(j-k)
            k=j
            if t2==1:
                t1=1
            else:
                t1=0
    else:
        t+=[t1]*(H-k)
    T2+=[t]
T2=np.array(T2).T

print(np.max(T1+T2)-1)

Fixed submission:
import numpy as np
H,W=map(int,input().split())
S=[]
for i in range(H):
    s=input()
    s1=[]
    for j in range(W):
        if s[j]=='.':
            s1+=[1]
        else:
            s1+=[0]
    S+=[s1]
S=np.array(S)

Tl=np.zeros((H,W),dtype=np.int)
Tr=np.zeros((H,W),dtype=np.int)

Tu=np.zeros((H,W),dtype=np.int)
Td=np.zeros((H,W),dtype=np.int)
for i in range(1,W):
    Tl[:,i]+=(Tl[:,i-1]+1)*S[:,i-1]

for i in range(W-2,-1,-1):
    Tr[:,i]+=(Tr[:,i+1]+1)*S[:,i+1]

for i in range(1,H):
    Tu[i,:]+=(Tu[i-1,:]+1)*S[i-1,:]

for i in range(H-2,-1,-1):
    Td[i,:]+=(Td[i+1,:]+1)*S[i+1,:]

print(((Tl+Tr+Tu+Td)*S).max()+1)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
H,W=map(int,input().split())
S=[]
for i in range(H):
    s=input()
    s1=[]
    for j in range(len(s)):
        if s[j]=='.':
            s1+=[1]
        else:
            s1+=[0]
    S+=[s1]
S=np.array(S)
T1=[]
for i in range(S.shape[0]):
    s=S[i]
    t2=s[0]
    if t2==1:
        t1=1
    else:
        t1=0
    t=[]
    k=0
    for j in range(1,len(s)):
        if s[j]==t2:
            if t2==1:
                t1+=1
        else:
            t2=s[j]
            t+=[t1]*(j-k)
            k=j
            if t2==1:
                t1=1
            else:
                t1=0
    else:
        t+=[t1]*(len(s)-k)
    T1+=[t]
T1=np.array(T1)


T2=[]
for i in range(S.T.shape[0]):
    s=S.T[i]
    t2=s[0]
    if t2==1:
        t1=1
    else:
        t1=0
    t=[]
    k=0
    for j in range(1,len(s)):
        if s[j]==t2:
            if t2==1:
                t1+=1
        else:
            t2=s[j]
            t+=[t1]*(j-k)
            k=j
            if t2==1:
                t1=1
            else:
                t1=0
    else:
        t+=[t1]*(len(s)-k)
    T2+=[t]
T2=np.array(T2).T
print(np.max(T1+T2)-1)

Fixed submission:
import numpy as np
H,W=map(int,input().split())
S=[]
for i in range(H):
    s=input()
    s1=[]
    for j in range(W):
        if s[j]=='.':
            s1+=[1]
        else:
            s1+=[0]
    S+=[s1]
S=np.array(S)

Tl=np.zeros((H,W),dtype=np.int)
Tr=np.zeros((H,W),dtype=np.int)

Tu=np.zeros((H,W),dtype=np.int)
Td=np.zeros((H,W),dtype=np.int)
for i in range(1,W):
    Tl[:,i]+=(Tl[:,i-1]+1)*S[:,i-1]

for i in range(W-2,-1,-1):
    Tr[:,i]+=(Tr[:,i+1]+1)*S[:,i+1]

for i in range(1,H):
    Tu[i,:]+=(Tu[i-1,:]+1)*S[i-1,:]

for i in range(H-2,-1,-1):
    Td[i,:]+=(Td[i+1,:]+1)*S[i+1,:]

print(((Tl+Tr+Tu+Td)*S).max()+1)