#include #include void main() { char s[256]; int t,c; while(!feof(stdin)) {for(t=0;t<8;t++)s[0]=0; fgets(s,250,stdin);if(!s[0])continue;if(s[0]=='-')continue; c=0; for(t=0;t<8;t++) {c<<=1; if(isalnum(s[t]))c|=0x01; } putchar(c); } }