Rosetta Problems

坊主めくりの結末

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/28