#include <stdio.h>
#include <string.h>
void inverter(char *str){
for (i = 0; i < tam / 2; ++i){
char temp = *(str + i);
*(str + i) = *(str + tam - i - 1);
*(str + tam - i - 1) = temp;
}
}
int main(){
char strings[4][100];
int i;
for (i = 0; i < 3; ++i){
inverter(strings[i]);
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnZvaWQgaW52ZXJ0ZXIoY2hhciAqc3RyKXsKICAgIGludCB0YW0gPSBzdHJsZW4oc3RyKSwgaTsKICAgIGZvciAoaSA9IDA7IGkgPCB0YW0gLyAyOyArK2kpewogICAgICAgIGNoYXIgdGVtcCA9ICooc3RyICsgaSk7CiAgICAgICAgKihzdHIgKyBpKSA9ICooc3RyICsgdGFtIC0gaSAtIDEpOwogICAgICAgICooc3RyICsgdGFtIC0gaSAtIDEpID0gdGVtcDsKICAgIH0KfQoKaW50IG1haW4oKXsKICAgIGNoYXIgc3RyaW5nc1s0XVsxMDBdOwogICAgc3RyY3B5KHN0cmluZ3NbMF0sICJBbmEiKTsKICAgIHN0cmNweShzdHJpbmdzWzFdLCAiQmlhIik7CiAgICBzdHJjcHkoc3RyaW5nc1syXSwgIkxpYSIpOwoKICAgIGludCBpOwogICAgZm9yIChpID0gMDsgaSA8IDM7ICsraSl7CiAgICAgICAgaW52ZXJ0ZXIoc3RyaW5nc1tpXSk7CiAgICAgICAgcHJpbnRmKCIlc1xuIiwgc3RyaW5nc1tpXSk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0=