https://www.codechef.com/problems/COOLING

help me to understand this error in this code for the above question?
my code is:
t = int(input())
for i in range(t):
n = int(input())
p = list(map(int,input().split()))
w = list(map(int,input().split()))
p.sort()
w.sort()
l=[]
for i in range(len(p)):
for j in range(len(w)):
if p[i]<w[j]:
l.append(l[i])
print(len(l))
my error is:
Traceback (most recent call last):
File “./prog.py”, line 1, in
EOFError: EOF when reading a line

problem link:COOLING Problem - CodeChef