#include <iostream> #include <string> using namespace std; string str("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"); void jzzh(int n,int x) { if(n>=x) { jzzh(x/n,x); } cout << str[x%n]; } int main() { int n,x; cin >> n >> x; jzzh(n,x); return 0; }