for(a in strsplit(readLines("stdin"),""))write(length(unique(a))%%2,1)