• + 0 comments
    def total(i,j,m):
    a = m[i-1][j-1] + m[i-1][j] + m[i-1][j+1] 
    b = m[i][j]
    c = m[i+1][j-1] + m[i+1][j] + m[i+1][j+1] 
    return a + b + c 
    
    
    if __name__ == '__main__':
    l = []
    for _ in range(6):
    row = list(map(int,input().split()))
    l.append(row)
    s = [] 
    for i in range(1,5):
    for j in range(1,5):
    s.append(total(i,j,l)) 
    
    print(max(s))