Rosetta Problems

The Path of Carrying Luggage

https://atcoder.jp/contests/awc0016/tasks/awc0016_d