current[list[i]] = {
                        list[i + 1]: {}} if i < (len(list) - 1) else {}