Python easy solution using stack 
\nclass Solution(object):\n    def flatten(self, head):\n        if not head:\n            return\n        \n        dummy = Node(0,None,head,None)     \n      
```\nclass Solution(object):\n    def flatten(self, head):\n        if not head:\n            return\n        \n        dummy = Node(0,None,head,None)     \n        stack = []\n        stack.append(head)\n        prev = dummy\n        \n        while stack:\n            root = stack.pop()\n\n            root.prev = prev\n            prev.next = root\n            \n            if root.next:\n                stack.append(root.next)\n                root.next = None\n            if root.child:\n                stack.append(root.child)\n                root.child = None\n            prev = root        \n            \n        \n        dummy.next.prev = None\n        return dummy.next\n```
[]