Why this piece of can pass only one test case?

hello @rajsaxena.personal
print output for each test case in separate line.