sorting using tree

join shbcf.ru