#STSC1C. [STSC OI - 1C] 二叉树 (binary)

[STSC OI - 1C] 二叉树 (binary)

Description

Given the preorder and inorder traversal sequences of a binary tree, output its postorder traversal.

Input

The input consists of two lines.

Line 11: The preorder traversal of the binary tree.

Line 22: The inorder traversal of the binary tree.

Output

Output one line containing the postorder traversal of the binary tree.

ABCD
CBAD
CBDA

Hint

For 100%100\% of the test cases, the input string length 11 \le is 20\le 20, containing only uppercase letters.

The data guarantees a valid solution.

【Sample #1 Explanation】

The binary tree structure is as follows:

      A
     / \
    B   D
   /
  C