1117 Hierarchy interesting task.
Timus.