UVA10021 Cube in the labirint

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=962 [PDF](https://uva.onlinejudge.org/external/100/p10021.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10021/eb48cf87964c4c8617d1c5c4148e21660fac3d88.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10021/799357fcc785e68e296b096f4a8b75de7fbfb226.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10021/0208eb3a98ec24bcf21ef42a99eb80241924fc73.png)