#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fast_io ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define all(v) v.begin(),v.end()

const int mod = 1e9 + 7;

int main (){
    fast_io;
    int n, k;
    cin >> n >> k;
    string ans;
    for (int i = 0; i < k; i++) {
        for (int j = i; j < k; j++) {
            ans.push_back((char)(j + 97));
            if (j + 1 != k)
                ans.push_back((char)(i + 97));
        }
    }
    int len = ans.length();
    for (int i = 0; i < n; i++) {
        cout << ans[(i % len)];
    }
    cout << endl;
}
