Almost working

Runtime error after printing first test cases