Rosetta Problems

Peace with Magic

https://atcoder.jp/contests/npcapc_2024/tasks/npcapc_2024_k