Magic spells

Problem Name:
Magic spells
Site:CodeForces
Links:
Tags: