Rosetta Problems

おそろいの景品

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/27