Solves all test cases but also gives an IOException