Nikolay Domashenko's submission of Three Friends | CodeChef