UVA921 A Word Puzzle in the Sunny Mountains

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=862 [PDF](https://uva.onlinejudge.org/external/9/p921.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA921/3a2e8a3c2cca050ea664b3c94ac7909dfc1859ff.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA921/84dbfd40279a6857206190b71873e3157b4e2cfb.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA921/4dbfd6c26e35f9eb6970b7ed7416da11222cc300.png)