Andrii Maksai's submission of Colorful Chain | CodeChef