UVA10597 Right Words

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1538 [PDF](https://uva.onlinejudge.org/external/105/p10597.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10597/6fb2860e45302802335c13c8433ffe968d74d946.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10597/8c64737d3951e9b42a3ac27a5eb8628c285c9d27.png)