UVA12045 Fun with Strings

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=3196 [PDF](https://uva.onlinejudge.org/external/120/p12045.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12045/1db4fa17947d2ecb6bd7a9dd6c2b522dec43f318.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12045/a3317cdc67709684e0664e5c2751da695e0632f0.png)