## E

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 ui and vi. 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.

#include<bits/stdc++.h>
#define debug cout<<"debug "<<++debug_num<<" :"
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
int debug_num=0;

string s;
int n;

const int maxn=1e5+10;

int a[maxn];

bool check(int x)
{
for(int i=1;i<=x;++i){
if(a[i]!=a[n-i]) return false;
}
if(a[1]!=1 || a[n]!=0) return false;
return true;
}

int main()
{
//freopen("in.txt","r",stdin);
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>s;
n=s.size();
//cout<<s<<endl;
for(int i=0;i<n;++i){
a[i+1]=s[i]-'0';
//cout<<a[i+1]<<endl;
}
if(!check(n/2)){
cout<<-1<<endl;
}
else{
int tp1=1;
int tp2;
for(int i=2;i<=n;++i){
if(a[i]==1){
tp2=i;
cout<<tp2<<" "<<tp1<<endl;
for(int i=tp1+1;i<tp2;++i){
cout<<tp2<<" "<<i<<endl;
}
tp1=tp2;
}
}
cout<<n<<" "<<n-1<<endl;
}
return 0;
}