use std::io::*;fn main(){let b=&mut[0;300];stdin().read(b);for i in 0..32{print!("{}",if b[8*i+1]==b[8*i+2]{b[8*i+2]}else{b[8*i+4]}as char)}}