char c[];main(i){for(;gets(c);puts(c))for(i=strlen(c);(c[--i]^=1)==48;);}