Rosetta Problems

The Morning after Halloween

https://onlinejudge.u-aizu.ac.jp/problems/1281