Andrey's submission of Magic Board | CodeChef