#include<bits/stdc++.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
string a[13]={"0","1","2","3","4","5","6","7","8","9","A","B","C"};
int t1,t2,t3;
cin>>t1>>t2>>t3;
cout<<"#";
if(t1<13){
cout<<"0"<<a[t1];
}else{
cout<<a[t1/13]<<a[t1%13];
}
if(t2<13){
cout<<"0"<<a[t2];
}else{
cout<<a[t2/13]<<a[t2%13];
}
if(t3<13){
cout<<"0"<<a[t3];
}else{
cout<<a[t3/13]<<a[t3%13];
}
return 0;
}