use std::io::*;fn main(){let mut b=[0;288];stdin().read(&mut 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)}}