samar's submission of Magic Pocket | CodeChef