UVA969 AlienAlgebra

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=910 [PDF](https://uva.onlinejudge.org/external/9/p969.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA969/5e0a8592c59e6c17a3441555310f79162f629dd6.png)

Input Format

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

Output Format

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