#include <stdio.h>
void tohex(int n) {
if(n==0) return;
else{
tohex(n/16);
if(n
%16<10) printf("%d",n
%16); else if(n
%16==10) printf("A"); else if(n
%16==11) printf("B"); else if(n
%16==12) printf("C"); else if(n
%16==13) printf("D"); else if(n
%16==14) printf("E"); else if(n
%16==15) printf("F"); }
}
int main(){
int n;
tohex(n);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHRvaGV4KGludCBuKSB7CiBpZihuPT0wKSByZXR1cm47CiBlbHNlewogIHRvaGV4KG4vMTYpOwogIGlmKG4lMTY8MTApIHByaW50ZigiJWQiLG4lMTYpOwogIGVsc2UgaWYobiUxNj09MTApIHByaW50ZigiQSIpOwogIGVsc2UgaWYobiUxNj09MTEpIHByaW50ZigiQiIpOwogIGVsc2UgaWYobiUxNj09MTIpIHByaW50ZigiQyIpOwogIGVsc2UgaWYobiUxNj09MTMpIHByaW50ZigiRCIpOwogIGVsc2UgaWYobiUxNj09MTQpIHByaW50ZigiRSIpOwogIGVsc2UgaWYobiUxNj09MTUpIHByaW50ZigiRiIpOwogfQp9CgppbnQgbWFpbigpewogaW50IG47CiBzY2FuZigiJWQiLCZuKTsKIHRvaGV4KG4pOwogcmV0dXJuIDA7Cn0=