def simpleInput(l, sum1):
for i in range(0, len(l)):
sum1 = sum1 + int(l[i])
if sum1<0:
return
else:
print(l[i])
return
input_string = input()
l = input_string.split()
sum1 = 0
simpleInput(l, sum1)
The sample test case is passed but for the rest of the test cases it says wrong answer. I can’t figure out the error. Please help.