#include<stdio.h>
#define LEN 100
void reverse(char s[],int len_s);
main()
{
char str[LEN];
int length;
while((length=my_getline(str,LEN))>0) {
reverse(str,length);
}
}
void reverse(char s[],int len_s)
{
int i;
for (i=len_s;i>=0;i--){
putchar(s[i]);
}
}
int my_getline(char s[], int lim)
{
int c, i;
for (i = 0; i < lim - 1 && (c = getchar()) != EOF && c != '\n';
++i)
s[i] = c;
if (c == '\n') {
s[i] = c;
++i;
}
s[i] = '\0';
return i;
}