Parse tree for $1234$ looks like $\Rightarrow$
In TDP, Traverse the tree top $\rightarrow$ down, left $\rightarrow$ right, and perform a semantic action for the first time it occurs during tree traversal. Thus $214$ is the answer.
In BUP we perform semantic action during reduction, Thus $412$ is the answer in the case of BUP.