Problem ID: 5358

Print a blank line between test cases - not after each test case. (So, there should not be a blank line printed after the last test case.) Printing a blank line after each test case will result in a verdict of wrong answer on ACM-ICPC Live Archive.
Delete Input