#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,M; cin>>N>>M; if(M==0){ cout<<0<<'\n'; return 0; } vectorans; while(M){ ans.push_back(M%N); M/=N; } for(int i=ans.size()-1;i>=0;i--)cout<