Rosetta Problems

The Enemy of My Enemy is My Friend

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