Rosetta Problems

Ancient Commemorative Monolith

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