Dinesh Goyal's submission of Three Friends | CodeChef