Rosetta Problems

Free Contest 2 - JEWEL

https://oj.vnoi.info/problem/fc002_jewel