#include<bits/stdc++.h>
#define FOR(i,x,y) for ( int i=(x);i<=(y);i++)
#define forr(i,x,y) for ( int i=(x);i<(y);i++)
#define dow(i,x,y) for ( int i=(x);i>=(y);i--)
#define Debug(v) for (auto i:v) cout<<i<<" ";puts("")
#define mp make_pair
#define fi first
#define pb push_back
#define ep emplace_back
#define siz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define fil(a,b) memset((a),(b),sizeof(a))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pa;
typedef pair<ll,ll> PA;
typedef vector<int> poly;
const int N = 3e5+10, MOD= 1e9+7;
int n,k;
int out[27][27];
vector<vector<int>> ne;
/* aa
 * ab
 * aabbacca b
 * bb
 * 
 * */
void dfs(int i,string&s){
forr(j,0,k){
	if (out[i][j]) continue;

	out[i][j]=1;
	dfs(j,s);}

s+=i+'a';	

}


void solve(){
cin>>n>>k;
string s="";
ne.resize(k, vector<int>(k,0));
forr(i,0,k){
	forr(j,0,k){
		out[i][j]=0;}}

	//s='a';
	dfs(0,s);int k=0;
	if (s[0]==s.back())k=1;
	forr(i,0,n){

cout<<s[i%(s.length()-k)];
}


cout<<endl;}
int main(){
	    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

	int i=1;
	int w=1;
	//cin>>w;
	forr(j,1,w+1){
		solve();
 
		}
	
	return 0;
	}
