Rosetta Problems

Card Stacking

https://atcoder.jp/contests/awc0060/tasks/awc0060_d