Rosetta Problems

Genealogy of Puppets

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