UVA10710 Chinese Shuffle

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1651 [PDF](https://uva.onlinejudge.org/external/107/p10710.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10710/9dafb7d80edbfbefeae5701006f13d2a42b1cfce.png)

Input Format

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

Output Format

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