Rosetta Problems

-- - B

https://atcoder.jp/contests/arc112/tasks/arc112_b