Rosetta Problems

Cats Going Straight

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