谱曲 Melody "Creation"

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=4011 [PDF](https://uva.onlinejudge.org/external/125/p12566.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12566/c6c363c430daa5bf851fdce3b418957033bc8ff0.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12566/8d3cc0806013ea9d8e3b90c3cfcd205d499d3686.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12566/6b7c76f29b653f815c933f68107707c45ed6b2c2.png)

输入输出样例

输入样例 #1

5
0
5 5 6 5 1=4 3 | 1 1 2 1 5 4 |
1=5 5 5 3 1 7=3 2 | b7 b7 6 4
5=2 1 ||
1
b7 b7 b7 b7 7 ||
0
b7 b7 b7 b7 7 ||
5
6 7 6 7 7 7 ||
1
1 #1 2 #2 3 #4 ||

输出样例 #1

Case 1: 5 5 6 5 1 7 | 5 5 6 5 2 1 |
5 5 5 3 1 7 6 | 4 4 3 1 2 1 ||
Case 2: 1 1 1 1 #1 ||
Case 3: 3 3 3 3 4 ||
Case 4: #2 4 #2 4 4 4 ||
Case 5: 2 #2 3 4=3 4 5 ||