An artificial neural network, often called just a neural network, is a mathematical model inspired by biological neural networks. A neural network consists of an interconnected group of artificial neurons, and it processes information using a connectionist approach to computation.
The neural network is called layered if its neurons are organized into groups called layers. There is no connection between two neurons belonging to the same layer.
Let us number the neurons with sequential positive integers from 1 to q, where q is the number of neurons in the network. The connection between neuron i and neuron j can be described with the connection weight w_i,j.
A neural network can be represented as a directed acyclic graph: neurons can be represented by the vertices, and connections between neurons --- by the edges. The connection weight for each connection can be represented as the weight of the corresponding edge.

In the image above there is a neural network consisting of four layers. The first layer contains neurons 1, 2 and 3, the second layer contains neurons 4 and 5, the third layer consists of neurons 6, 7 and 8, and the fourth one contains the only neuron 9.
Each neuron i has its value v_i, which is calculated by the following formula:
v_i=1+e−∑_jv_j⋅w_j,i1
The layered neural network is called binary neural network if it has the following properties:
In this problem you are to create a binary neural network that implements the binary function f(x_1, x_2, … x_n) with n arguments.
The first layer of this binary neural network should contain exactly n neurons numbered with sequential positive integers from 1 to n. The value of neuron i will be automatically set to x_i. All the other neurons should be numbered with sequential positive integers from n+1 to q, where q is the number of neurons in the network. All the values v_i (n+1≤i≤q) will be calculated by the formula that is given above.
The last layer of this binary neural network should contain the only neuron. The value of this neuron should differ from the value f(x_1, x_2, … x_n) by no more than 10−7.
The binary network should not contain more than 25 layers. The number q of neurons should not be greater than 104. The total number e of connections should not be greater than 3⋅104.
The first line of input contains the only integer n (2≤n≤10). The second line of input contains 2n characters. Each of these characters is either '0' or '1'. The first character describes the value of f(0,…,0,0), the second one describes the value of f(0,…,0,1) and so on, the last one describes the value of f(1,…,1,1).
On the first line output two integers l and q --- the number of layers and the number of neurons in the binary neural network respectively (2≤l≤25, 1≤q≤104).
On the second line output q integers p_i. Here p_i is the number of layer that the neuron i belongs to (1≤p_i≤l).
On the third line output the only integer e --- the number of connections in the binary neural network (n≤e≤3⋅104).
Each of the following e lines should contain two integers a_i, b_i and one real number w_a,b --- description of the connection from a_i to b_i with the weight w_a,b (∣w_a,b∣≤1000).