Help me in solving GAME_XI problem

My issue

for _ in range(int(input())):
a,b=map(int,input().split())
li1=list(map(int,input().split()))
li2=list(map(int,input().split()))
score=0
c=0
li3=
if a>=4 and b>=4 :
li1.sort()
li2.sort()
score=sum(li1[-4:])+sum(li2[-4:])
del li1[-4:]
del li2[-4:]
li3=li1+li2
li3.sort(reverse=True)
score=score+sum(li3[:3])
print(score)
else:
print(“-1”)
Give me correct code

My code

for _ in range(int(input())):
    a,b=map(int,input().split())
    li1=list(map(int,input().split()))
    li2=list(map(int,input().split()))
    score=0
    c=0
    li3=[]
    if a>=4 and b>=4 :
        li1.sort()
        li2.sort()
        score=sum(li1[-4:])+sum(li2[-4:])
        del li1[-4:]
        del li2[-4:]
        li3=li1+li2
        li3.sort(reverse=True)
        score=score+sum(li3[:3])
        print(score)
    else:
        print("-1")

Problem Link: GAME 11 Practice Coding Problem - CodeChef

Consider this:
a = 4
b = 4

It will be considered as valid and its “score” be printed. However, you need a team of at least 11, that would be of 8