I am bit confused. Please tell me if I have N test cases, and if I print output after completion of a test case will this be considered as correct output? or I have to print all outputs together after the whole input process.
You can print after each test case.