Rosetta Problems

Symphony of the Kettles

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