Python Code:

  1. import math
  2. import os
  3. import random
  4. import re
  5. import sys
  6. if __name__ == '__main__':
  7.     arr = []
  8.     for _ in range(6):
  9.         arr.append(list(map(int, input().rstrip().split())))
  10.         summ = -57576576576
  11.     n = len(arr)
  12.     summ = []  
  13.     for i in range(4):
  14.         for j in range(4):
  15.             h =  arr[i][j]+arr[i][j+1]+arr[i][j+2] +arr[i+1][j+1]+ arr[i+2][j]+arr[i+2][j+1]+arr[i+2][j+2]
  16.             summ.append(h)
  17.     summ.sort()
  18.     print(summ[-1])

Get Code From Here