you play board card game in game player characteristics x y white magic skill black magic skill respectively there n spell card lie table characteristic ai bi ci di in player pick card cast spell write characteristic meet requirement aix biy ie player magic skill cast spell however cast spell characteristics player change equal xci ydiAt begin game characteristic player equal zero the goal game cast nth spell your task move possible you allow use spell order number times example use spell