Meta interview question

Given binary tree, flatten it to a linked list (move all the references to node.right)