#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        s: chars,
    }

    let n = s.len();
    if s[0] == '0' || s[n - 1] == '1' {
        println!("-1");
        return;
    }

    for i in 0..(n - 1) / 2 {
        if s[i] != s[n - 2 - i] {
            println!("-1");
            return;
        }
    }

    let mut g: Vec<Vec<usize>> = vec![vec![]; n];
    let mut vs = vec![vec![]; 2];

    {
        let mut add_edge = |u: usize, v: usize| {
            g[u].push(v);
            g[v].push(u);
        };

        for i in 0..(n - 1) / 2 {
            if s[i] == '0' {
                vs[0].push(i * 2 + 0);
                vs[1].push(i * 2 + 1);
            } else {
                for j in 0..2 {
                    let u = i * 2 + j;
                    for &k in vs[j].iter() {
                        add_edge(u, k);
                    }
                    vs[j].clear();
                    vs[j].push(u);
                }
            }
        }

        let u0 = (n - 1) / 2 * 2;
        let u1 = (n - 1) / 2 * 2 + 1;

        if n % 2 == 1 {
            for j in 0..2 {
                for &v in vs[j].iter() {
                    add_edge(u0, v);
                }
            }
        } else {
            if s[(n - 1) / 2] == '0' {
                for j in 0..2 {
                    for &v in vs[j].iter() {
                        add_edge(u0, v);
                    }
                }
                add_edge(u0, u1);
            } else {
                for &v in vs[0].iter() {
                    add_edge(u0, v);
                }
                for &v in vs[1].iter() {
                    add_edge(u1, v);
                }
                add_edge(u0, u1);
            }
        }
    }

    // println!("{:?}", g);

    dfs(0, None, &g);
}

fn dfs(u: usize, prev: Option<usize>, g: &Vec<Vec<usize>>) {
    for &v in g[u].iter() {
        if Some(v) == prev {
            continue;
        }

        println!("{} {}", u + 1, v + 1);
        dfs(v, Some(u), g);
    }
}


Measured memory_bytes: 28796