def solution(land): last = land[0] for i in land[1:]: temp = [0,0,0,0] for idx, item in enumerate(i): temp[idx] = item + max(last[:idx] + last[idx+1:]) last = temp return max(last)