list : flattening multilevel linked list to singly linked list