Dinesh Goyal's submission of SUPW | CodeChef