The Tower is Going Home

Problem Name:
The Tower is Going Home
Site:CodeForces
Links:
Tags:
Problem setters: