#[allow(unused)] use proconio::{input, marker::Chars}; fn main() { input! { x: String, y: String, } let n = x.len() + y.len(); let mut s = String::new(); let mut xx = x.clone(); let mut yy = y.clone(); for i in 0..n { if i % 2 == 0 && xx.len() > 0 { s.push(xx.remove(0)); } else if i % 2 == 1 && yy.len() > 0 { s.push(yy.remove(0)); } } let a = s .chars() .enumerate() .filter(|(i, _)| i % 2 == 0) .map(|(_, x)| x) .collect::<String>(); let b = s .chars() .enumerate() .filter(|(i, _)| i % 2 == 1) .map(|(_, x)| x) .collect::<String>(); if a == x && b == y { println!("{}", s) } else { println!("?") } }