Rosetta Problems

Everlasting LIDS

https://atcoder.jp/contests/abc378/tasks/abc378_g