updated judge in order to handle multiple input lines per test case