#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define pb push_back
#define debug(x) cout << #x << " " << x << endl
#define all(x) x.begin(),x.end()
#define ll long long
#define vi vector<int>
#define vvi vector<vi>
#define vvvi vector<vvi>
#define vll vector<ll>
#define vvll vector<vll>
#define ld long double
#define ull unsigned long long
#define vull vector<ull>
#define fi first
#define se second
#define PII pair<int,int>
#define vPII vector<PII>
#define getunique(v) {sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());}



int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    //cout << setprecision(12) << fixed;
    int t = 1;
    //cin >> t;
    while(t--){
        int n,k;
        cin >> n >> k;
        vvi pos(26,vi(26,1));
        vi cnt(26,0);
        string ans = "a";
        int ile = k*k-1;
        rep(i,ile){
            int co = ans[i] - 'a';
            int nxt = 0;
            rep(j,k){
                if(pos[co][j] and cnt[j] < k){
                    nxt = j;
                    break;
                }
            }
            ans += char('a' + nxt);
            cnt[co]++;
            pos[co][nxt] = 0;
        }
        string ret = "";
        int mod = k*k;
        rep(i,n){
            ret += ans[i%mod];
        }
        cout << ret << "\n";
    }
}