You are given a string s of length n.
Does a tree with n vertices that satisfies the following conditions exist?
 - The vertices are numbered 1,2,..., n.
 - The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i.
 - If the i-th character in s is 1, we can have a connected component of size i by removing one edge from the tree.
 - If the i-th character in s is 0, we cannot have a connected component of size i by removing any one edge from the tree.
If such a tree exists, construct one such tree.
-----Constraints-----
 - 2 \leq n \leq 10^5
 - s is a string of length n consisting of 0 and 1.
-----Input-----
Input is given from Standard Input in the following format:
s
-----Output-----
If a tree with n vertices that satisfies the conditions does not exist, print -1.
If a tree with n vertices that satisfies the conditions exist, print n-1 lines.
The i-th line should contain u_i and v_i with a space in between.
If there are multiple trees that satisfy the conditions, any such tree will be accepted.
-----Sample Input-----
1111
-----Sample Output-----
-1
It is impossible to have a connected component of size n after removing one edge from a tree with n vertices.
#from collections import deque
#from heapq import heapify, heappop, heappush
#from bisect import insort, bisect_left
#import sys
#sys.setrecursionlimit(10**9)
#from math import gcd
#from decimal import Decimal
#mod = 1000000007
#mod = 998244353
#N = int(input())
#N, K = map(int, input().split())
S = input()
eda = []
flag = False
N = len(S)
if S[-1] == '1':
  flag = True
if S[0] == '0':
  flag = True
if S[-2] == '0':
  flag = True
for k in range((N-1)//2):
  if S[k] != S[-k-2]:
    flag = True
  if S[k] == '1':
    eda.append(k+1)
if N%2 == 0:
  if S[N//2 -1] == '1':
    eda.append(N//2)
if flag:
  print((-1))
  return
ans = []
eda.reverse()
before = eda.pop()
while eda:
  after = eda.pop()
  for k in range(before, after):
    ans.append((k, after))
  before = after
ans.append((before, before+1))
for k in range(before+2, N+1):
  ans.append((before+1, k))
while ans:
  item = ans.pop()
  print((item[0], item[1]))
#ans = 0
#for k in range(N):
#print(ans)
#print('Yes')
#print('No')

#from collections import deque
#from heapq import heapify, heappop, heappush
#from bisect import insort, bisect_left
#import sys
#sys.setrecursionlimit(10**9)
#from math import gcd
#from decimal import Decimal
#mod = 1000000007
#mod = 998244353
#N = int(input())
#N, K = map(int, input().split())
S = input()
eda = []
flag = False
N = len(S)
if S[-1] == '1':
  flag = True
if S[0] == '0':
  flag = True
if S[-2] == '0':
  flag = True
for k in range((N-1)//2):
  if S[k] != S[-k-2]:
    flag = True
  if S[k] == '1':
    eda.append(k+1)
if N%2 == 0:
  if S[N//2 -1] == '1':
    eda.append(N//2)
if flag:
  print((-1))
  return
ans = []
eda.reverse()
before = eda.pop()
while eda:
  after = eda.pop()
  for k in range(before, after):
    ans.append((k, after))
  before = after
ans.append((before, before+1))
for k in range(before+2, N+1):
  ans.append((before+1, k))
while ans:
  item = ans.pop()
  print((item[0], item[1]))
#ans = 0
#for k in range(N):
#print(ans)
#print('Yes')
#print('No')
