main(c,v)char*c;{for(;gets(v);puts())for(c=v+strlen(v);(*--c^=1)<49;);}