#arc103c. [arc103_c]Tr/ee

[arc103_c]Tr/ee

Problem Statement

You are given a string ss of length nn. Does a tree with nn vertices that satisfies the following conditions exist?

  • The vertices are numbered 1,2,...,n1,2,..., n.
  • The edges are numbered 1,2,...,n11,2,..., n-1, and Edge ii connects Vertex uiu_i and viv_i.
  • If the ii-th character in ss is 1, we can have a connected component of size ii by removing one edge from the tree.
  • If the ii-th character in ss is 0, we cannot have a connected component of size ii by removing any one edge from the tree.

If such a tree exists, construct one such tree.

Constraints

  • 2leqnleq1052 \\leq n \\leq 10^5
  • ss is a string of length nn consisting of 0 and 1.

Input

Input is given from Standard Input in the following format:

ss

Output

If a tree with nn vertices that satisfies the conditions does not exist, print -1.

If a tree with nn vertices that satisfies the conditions exist, print n1n-1 lines. The ii-th line should contain uiu_i and viv_i with a space in between. If there are multiple trees that satisfy the conditions, any such tree will be accepted.


Sample Input 1

1111

Sample Output 1

-1

It is impossible to have a connected component of size nn after removing one edge from a tree with nn vertices.


Sample Input 2

1110

Sample Output 2

1 2
2 3
3 4

If Edge 11 or Edge 33 is removed, we will have a connected component of size 11 and another of size 33. If Edge 22 is removed, we will have two connected components, each of size 22.


Sample Input 3

1010

Sample Output 3

1 2
1 3
1 4

Removing any edge will result in a connected component of size 11 and another of size 33.