A multilevel hierarchy

http://ideone.com/KMVOo2