char b,t=15,o;main(i){for(;read(0,&b,1);write(1)){o=b;b=t<<4|b>>4;t=o;};b=t<<4|15;write(1);}