Help me in solving POPCORN problem

My issue

My code

# cook your code here
for t in range(int(input())):
    a1,a2 = map(int,input().split())
    b1, b2 = map(int,input().split())
    c1, c2 = map(int,input().split())
    print(max((a1+a2),(b1+b2),(c1+c2)))
    a1,a2 = map(int,input().split())
    b1, b2 = map(int,input().split())
    c1, c2 = map(int,input().split())
    print(max((a1+a2),(b1+b2),(c1+c2)))

Problem Link: POPCORN Problem - CodeChef

@mr7889

The code is fine. You should remove the duplicate part from your code, below the first print statement.

# cook your dish here
for _ in range(int(input())):
    a1,a2=map(int,input().split())
    b1,b2=map(int,input().split())
    c1,c2=map(int,input().split())
    print(max((a1+a2),(b1+b2),(c1+c2)))