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

int main() {
  char password[501] = {NULL}, tmp, n;
  int length;
  while(1) {
    gets(password);
if (strcmp(password, "END") == 0) break;
    length = strlen(password);
    if (length % 2 == 0) {
      n = length/2;
    }
    else {
      n = (length-1)/2;
    }
      for (int i = 0 ; i < n; i++) {
        tmp = password[i];
        password[i] = password[length-1-i];
        password[length-1-i] = tmp;
      }
    puts(password);
    for (int i = 0; i < length; i++) {
      password[i] = '\0';
    }
  }
  return 0;
}