#include <stdio.h> int main() { int n, tmp = 0; while (scanf("%d", &n) != EOF) { while (n) { tmp *= 10; tmp = n % 10 + tmp; n /= 10; } } printf("%04d", tmp); return 0; }