#include<bits/stdc++.h>
using namespace std;
#define fo(i,n) for(i=0;i<n;i++)
#define pb push_back
#define F first
#define S second
typedef pair<int, int>  pii;
typedef vector<int>     vi;
typedef vector<pii>     vpii;
typedef vector<vi>      vvi;
 

 
int main() 
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
 
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
 
    int n,k,i,j;
    cin>>n>>k;
    string s;
    fo(i,k)
    {
    	s+=('a'+i);
        for(j=i+1;j<k;j++)
        {
        	s+=('a'+i);
            s+=('a'+j);
        }
    }
    //cout<<s;
    int x=k*k;
    string ans;
    fo(i,(n/x))
    ans+=s;
    fo(i,n%x)
    ans+=s[i];
    cout<<ans<<endl;
    return 0;
}