You are a craftsman in the Kuanzhai Alley. One day, a customer ordered a black and white bead string from you. The black and white bead string is shaped like a chain, with black and white beads arranged on it. The customer also presented you with $$$k$$$ conditions, each of which is as follows:
Here, a substring refers to a continuous segment of beads in the black and white bead string.
Please construct a black and white bead string for the customer that satisfies all the above conditions and has the minimum length. To ensure that the bead string you construct meets the above conditions, you also need to provide the position of a substring that satisfies each condition.
The first line contains an integer $$$k$$$ ($$$1\leq k\leq 10^5$$$), indicating the number of conditions.
The next $$$k$$$ lines, where the $$$i$$$-th line contains two integers $$$x_i,y_i$$$ ($$$1\leq x_i\leq 10^6,0\leq y_i\leq x_i$$$), representing the content of the $$$i$$$-th condition.
The first line contains an integer $$$l$$$, representing the minimum length of the black and white bead string that satisfies the conditions.
The second line contains a string consisting of 0 and 1, with a length of $$$l$$$, representing the black and white bead string you constructed. Here, 0 represents a white bead, and 1 represents a black bead.
The next $$$k$$$ lines, where the $$$i$$$-th line contains an integer $$$p_i$$$, representing the starting position of a substring that satisfies the $$$i$$$-th condition in the bead string. Here, the position of the bead string is numbered starting from $$$0$$$.
33 13 22 0
4 1100 1 0 2
42 13 34 03 2
7 1110000 2 0 3 1
| Name |
|---|


