#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {
    char *str;
    int length;
	int i;
    str = (char *)malloc(101); 
    if (str == NULL) {
        fprintf(stderr, "ÄÚ´æ·ÖÅäÊ§°Ü\n");
        exit(EXIT_FAILURE);
    }

    fgets(str, 101, stdin); // 

    if (str[strlen(str) - 1] == '\n') {
        str[strlen(str) - 1] = '\0';
    }

    length = strlen(str);

    char *reversed = (char *)malloc((length + 1) * sizeof(char));
    if (reversed == NULL) {
        fprintf(stderr, "ÄÚ´æ·ÖÅäÊ§°Ü\n");
        exit(EXIT_FAILURE);
    }

    for (i = 0; i < length; i++) {
        reversed[i] = str[length - 1 - i];
    }
    reversed[i + 1] = '\0';

    printf("%s\n", reversed);
    
    free(reversed);
    free(str);

    return 0;
}
