#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LINE_SIZE 1000

int main() {
	char line[LINE_SIZE];
	while(!feof(stdin)) {
		fgets(line, LINE_SIZE, stdin);
		size_t i = strlen(line) - 1;
		if (line[--i] != '\n') {
			putchar(line[i--]);
		}
		for (; i > 0; i--)
			putchar(line[i]);
		putchar(line[0]);
		putchar('\n');
	}
}
