#include<stdio.h>
#include<stdlib.h>
struct node{
	char data;
	struct node *link;
}*head;
int main()
{
	char ch;
	struct node *p;
	head=NULL;
    while((ch=getchar())!='\n')
	{
		p=(struct node*)malloc(sizeof(struct node));
		p->data=ch;
		p->link=head;
		head=p;
	}
    p=head;
    while(p!=NULL)
	{
      printf("%c",p->data);
	  p=p->link;
	}
}