form linked list form tree leaves