Rosetta Problems

From Above and From the Side

https://atcoder.jp/contests/past202209-open/tasks/past202209_n