#include <bits/stdc++.h>
using namespace std;
int main()
{
int l, n;
cin >> l >> n;
int num = pow(26, l) - n;
char a[l];
for (int i = l - 1; i >= 0; i--)
a[i] = num % 26 + 'a', num /= 26;
for (auto c : a) cout << c;
return 0;
}