#include <stdio.h>
#include <string.h>
#include "alphabet.h"
int main(void){
FILE *in;
FILE *out;
const unsigned int BLOCK_SIZE = 3;
char block[BLOCK_SIZE];
in = fopen("input.txt", "rt");
if(in == NULL){ fputs("File error", stderr); return 1; }
out = fopen("output.txt", "wt");
if(out == NULL){ fputs("File error", stderr); return 1; }
while(!feof(in)){
memset(block, 0, sizeof(block));
if(fread(block, sizeof(char), BLOCK_SIZE, in) != 0){
fwrite(block, sizeof(char), BLOCK_SIZE, out);
//!!!!!!!!
for(int i = 0; i < BLOCK_SIZE; i++){
printf("%d", block[i]);
printf(" ");
}
printf("\n");
int mark = 0;
for(int i = 0; i < BLOCK_SIZE; i++){
mark += block[i]*(2 << (BLOCK_SIZE - 1 - i));
}
printf("%d", mark);
printf("\n");
}
}
fclose(in);
fclose(out);
//printf("%d", indexof('D'));
int p;
scanf("%d", p);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgImFscGhhYmV0LmgiCgoKaW50IG1haW4odm9pZCl7CiAgICBGSUxFICppbjsKICAgIEZJTEUgKm91dDsKICAgIGNvbnN0IHVuc2lnbmVkIGludCBCTE9DS19TSVpFID0gMzsKICAgIGNoYXIgYmxvY2tbQkxPQ0tfU0laRV07CiAgICAKICAgIGluID0gZm9wZW4oImlucHV0LnR4dCIsICJydCIpOwogICAgaWYoaW4gPT0gTlVMTCl7IGZwdXRzKCJGaWxlIGVycm9yIiwgc3RkZXJyKTsgcmV0dXJuIDE7IH0KICAgIAogICAgb3V0ID0gZm9wZW4oIm91dHB1dC50eHQiLCAid3QiKTsKICAgIGlmKG91dCA9PSBOVUxMKXsgZnB1dHMoIkZpbGUgZXJyb3IiLCBzdGRlcnIpOyByZXR1cm4gMTsgfQogICAgCiAgICB3aGlsZSghZmVvZihpbikpewogICAgICAgIG1lbXNldChibG9jaywgMCwgc2l6ZW9mKGJsb2NrKSk7CiAgICAgICAgaWYoZnJlYWQoYmxvY2ssIHNpemVvZihjaGFyKSwgQkxPQ0tfU0laRSwgaW4pICE9IDApewogICAgICAgICAgICBmd3JpdGUoYmxvY2ssIHNpemVvZihjaGFyKSwgQkxPQ0tfU0laRSwgb3V0KTsKICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgLy8hISEhISEhIQogICAgICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgQkxPQ0tfU0laRTsgaSsrKXsKICAgICAgICAgICAgICAgIHByaW50ZigiJWQiLCBibG9ja1tpXSk7CiAgICAgICAgICAgICAgICBwcmludGYoIiAiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBwcmludGYoIlxuIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICBpbnQgbWFyayA9IDA7CiAgICAgICAgICAgIGZvcihpbnQgaSA9IDA7IGkgPCBCTE9DS19TSVpFOyBpKyspewogICAgICAgICAgICAgICAgbWFyayArPSBibG9ja1tpXSooMiA8PCAoQkxPQ0tfU0laRSAtIDEgLSBpKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcHJpbnRmKCIlZCIsIG1hcmspOwogICAgICAgICAgICBwcmludGYoIlxuIik7CiAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgIAogICAgfQogICAgCiAgICBmY2xvc2UoaW4pOwogICAgZmNsb3NlKG91dCk7CiAgICAKCS8vcHJpbnRmKCIlZCIsIGluZGV4b2YoJ0QnKSk7CgogICAgaW50IHA7CiAgICBzY2FuZigiJWQiLCBwKTsKfQ==