UVA551 Nesting a Bunch of Brackets

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=492 [PDF](https://uva.onlinejudge.org/external/5/p551.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA551/34d1a0941ac36ffa34af4ab36dce7b1538210a78.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA551/0fad3a4d711181f750dbcaf4832a9876c7a37eac.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA551/6042314457a35d8c3cd2943e9365315fe2159c64.png)