Automatic Editing

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1056 [PDF](https://uva.onlinejudge.org/external/101/p10115.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10115/996a13556dd46f4187b09a73cc5df6c65ccf6e3d.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10115/660247cc18061c16517ebac351d93416f8900c69.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10115/0a39985db03a69495da9653b5144656e987d6ef5.png)

输入输出样例

输入样例 #1

4
ban
bab
baba
be
ana
any
ba b
hind the g
banana boat
1
t
sh
toe or top
0

输出样例 #1

behind the goat
shoe or shop