tree to list kata