for(s in strsplit(readLines("stdin"),""))write(apply(matrix(s,2),2,min),T,1e3,,"")