Mayank Tuteja's submission of PAL | CodeChef