UVA12820 Cool Word

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=861&page=show_problem&problem=4685 [PDF](https://uva.onlinejudge.org/external/128/p12820.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12820/a8a6c727bc2b5a36eecdab605da55eb364eb9c59.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12820/87e5ffd10344e85d183e6ceb02af66641f6a7acd.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12820/34509fbdacdf05b6708759b4629d7bf6f2d5d6ab.png)