UVA12252 ABCD Tiles

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=244&page=show_problem&problem=3404 [PDF](https://uva.onlinejudge.org/external/122/p12252.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12252/5df0755e48370413244b02834c9d27b11b8fa1b2.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12252/1bcb2274cf0bd3b40211d4d77b6b4782cf4cbd7e.png)

Output Format

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