import std.stdio;void main(){int d,n,x,c;for(readln;c=getchar-32,c<65;)x=c*x>0?d=d<<6|c&63,!n?n=6:putchar(d>>(n-=2)):!x;}