Working for test case 1
Pretty print
Solved