Rosetta Problems

Ascendant Descendant

https://atcoder.jp/contests/arc183/tasks/arc183_e