#include <bits/stdc++.h>
using namespace std;
int main()
{
  long long int n,characters=0;
  int k,x,y,offset;
  cin>>n>>k;
  int arr[k][k],index[k];
  for(x=0;x<k;x++){
    offset=97+x;
    index[x]=0;
  for(y=0;y<k;y++)
  {
    arr[x][y]=offset+y;
    if(arr[x][y]>=97+k)
    {
      arr[x][y]-=k;
    }
    //cout<<(char)arr[x][y]<<" ";
  }
  //cout<<endl;
  }
  x=y=0;
  while(characters<n)
  {
    int l=arr[x][y];
    cout<<(char) l;
    index[x]++;
    if(index[x]>=k)
    index[x]-=k;
    x=l-97;
    y=index[x];
    characters++;
  }
}