Rosetta Problems

The Kingdom of Akabeko

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