#include <stdio.h>

int main() {
	int input;
	char output[5];
	scanf("%d",&input);
	
	int index = 3;
	while(input != 0) {
		int num = input % 10 + 13;
		output[index] = 'A' + (num - 1);
		index --;
		input /= 10;
	}
	output[4] = '\0';
	printf("%s",output);
	
	return 0;
} 