fn translate_position(input: &str, index: usize) -> (usize, usize)