s=str(int(input(),26)) print(s.translate(str.maketrans("0123456789ABCDEFGHIJKLMNO","ABCDEFGHIJKLMNOPQRSTUVWXYZ")))