#T670. 复原二叉树

复原二叉树

Description

Little Tu is working on a data structure assignment. One of the problems gives the preorder traversal and inorder traversal results of a binary tree and asks you to write the postorder traversal result of that tree.

Input Format

The input contains multiple test cases. Each input consists of two strings, representing the preorder traversal and inorder traversal results of a binary tree, respectively. Each string is composed of unique uppercase letters.

Output Format

For each input, output the corresponding postorder traversal result of the binary tree.

```input1 DBACEGF ABCDEFG BCAD CBAD ``` ```output1 ACBFGED CDAB ``` ## 译文

CodesOnline