#include<iostream>
using namespace std;
void decTo(int num,int base)
{
if(num>0)
{
decTo(num/base,base);
if(num%base>9)
cout<<static_cast<char>(num%base+55);
else cout<<num%base;
}
}
int main()
{
int number,base;
cout<<"Enter the number and base:";
cin>>number>>base;
decTo(number,base);
cout<<endl;
}