Pregunta de entrevista de Bloomberg

Given a node that has a value and right and down pointers. Down pointers take precedence. Reconstruct the tree so that it is linear with only right pointers and all down pointers being null.