#include<bits/stdc++.h>
    
using namespace std;
    
#define int long long
#define endl "\n"

constexpr int MOD = 1e9+7;

void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }

void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> c(26);
    vector<int> p;
    
    function<void(int)> dfs = [&](int v) {
        while (c[v] < k) {
            int u = c[v]++;
            dfs(u);
            p.push_back(u);
        }
    };

    dfs(0);
    cout << 'a';
    for (int i = 0; i < n-1; ++i)
        cout << ((char)(p[i%p.size()]+'a'));
    cout << endl;
}


int32_t main() {
    ios_base::sync_with_stdio(false); 
    cin.tie(nullptr);

    solve();
    // int t; cin >> t;
    // while (t--) {
    //     solve();
    // }

    return 0;
}