12166

Problem ID: 12166

For output to display correctly, a newline must be put after the last line of input. Check out the sample input with the added newline that's been uploaded on uDebug.