h4 class="ui top attached block header">输入格式</h4><div class="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div class=content><div>* Line 1: A single integer N, the number of nodes in the tree.</div>
<div>* Lines 2..N: Line i+1: A single integer p_(i+1) (1 &lt;= p_(i+1) &lt;= i),&nbsp;</div>
<div>denoting an edge between nodes i+1 and p_{i+1} in the tree.</div>
<div>* Lines N+1..2N: Line N+i: Either ( or ), the label of node i.</div></div></div></div>