Runtime error for Codeforces 260B problem

Hi,
I am constantly getting Runtime Error for test-12 of this problem:

My submissions are as follows:

Can someone please point out which case I am missing?

Thanks