One test case not passing

please check and let me know why one of my test case is failing.

even though the output is correct the testcase is still failing

see for this testcase

5
30
40
35
45
42

your output is
1 2 1 2 1 END

but correct one is
1 2 1 4 1 END

i hope you understand
if not i recommend you to watch the video for same