#pragma GCC optimize(3,"Ofast","inline")
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include<string>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iterator>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <complex>
#include <ctime>
using namespace std;
int a[30][30];
int main()
{
	//freopen("in.txt","r",stdin);
	int n,k;
	cin>>n>>k;
	if(n==1) cout<<"a";
	else if(n==2) cout<<"aa";
	else
	{
	cout<<"a";
	//a[1][1]++;
	char pre='a';
	for(int i=1;i<=n-1;i++)
	{
		//cout<<pre; 
		int min1=0x3f3f3f3f;
		int loc=-1;
		for(int j=k;j>=1;j--)
		{
			if(a[pre-'a'+1][j]<min1) 
			{
				min1=a[pre-'a'+1][j];
				loc=j;
			}
		}
		cout<<(char)(loc+'a'-1);
		//cout<<pre-'a'+1<<" "<<loc+'a'-1<<" ";
		a[pre-'a'+1][loc]++;
		pre=(char)(loc+'a'-1);
	}
	//cout<<a[1][2];
	}
	
	  
}