Hierarchy Node Role Classification — Coding problem | OneNoughtOne