Craftsmen interview question

Tree Based query. Find root of a tree.