WA in all testcases in Book Allocation Problem

Sample testcase is passing

Oh, I forgot to print nextline after each output. Its resolved now