UVA11051 Dihedral groups

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=22&page=show_problem&problem=1992 [PDF](https://uva.onlinejudge.org/external/110/p11051.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11051/01ff02047b02db50888db906492948ec7c278ae4.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11051/92dc09ad9404b4c516d4cc102d807b37ab1681dc.png)

Output Format

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