Rosetta Problems

Next or Nextnext

https://atcoder.jp/contests/agc008/tasks/agc008_e