二叉树重建 Tree Recovery

题意翻译

输入一棵二叉树的先序遍历和中序遍历序列,输出它的后序遍历序列。

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=477 [PDF](https://uva.onlinejudge.org/external/5/p536.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA536/31880d83284f88152bc3ced132e44a059287841d.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA536/6cf9641beba18dacb91a54229188fb476aa81422.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA536/589e15741afc32cbd77da278e8e72ce3d5dbd670.png)

输入输出样例

输入样例 #1

DBACEGF ABCDEFG
BCAD CBAD

输出样例 #1

ACBFGED
CDAB