Help me in solving CS2023_STK problem idk whats wrong here im getting run time error

My issue

My code

for _ in range(int(input())):
    n = int(input())
    a = list(map(int,input().split(' ')))
    b = list(map(int,input().split(' ')))
    s1 = []
    c = 0
    d = 0
    s2 = []
    for i in range(n):
        if a[i] !=0:
            c+=1
            s1.append(c)
        else:
            c = 0
    for j in range(n):
        if b[j] !=0:
            d+=1
            s2.append(d)
        else:
            d = 0

    if max(s1)>max(s2):
        print("Om")
    elif max(s2)>max(s1):
        print("Addy")
    else:
        print("draw")


Problem Link: CS2023_STK Problem - CodeChef