#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ULL;
#define endl "\n"
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
void readvec(vector<int> &a, int n) {for (int i = 0; i < n; i++)cin >> a[i];}
void readvec(vector<ll> &a, int n) {for (int i = 0; i < n; i++)cin >> a[i];}
const int MOD = 1e9 + 7;
const int INF = (int)2e9 + 7;
const ll LINF = (ll)1e18;
const ld PI = 3.1415926535897932384626433832795;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

void solve() {
	int n, k;
	cin >> n >> k;
	string s = "";
	for (int i = 0; i < k; i++) {
		s += (char)(i + 'a');
		for (int j = i + 1; j < k; j++) {
			s += (char)(i + 'a');
			s += (char)(j + 'a');
		}
	}
	int idx = 0, sz = s.size();
	for (int i = 0; i < n; i++) {
		cout << s[idx % sz];
		idx++;
	}
}

int32_t main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t = 1;
	//cin >> t;
	for (int tt = 1; tt <= t; tt++)
	{
		//cout << "Case #" << tt << ": ";
		solve();
	}
}
