Ivan Mistreanu's submission of Magic sequence | CodeChef