Karthik's submission of Three Friends | CodeChef