Let's define the cost of a string s as the number of index pairs i and j (1 ≤ i < j < |s|) such that s_i = s_j and s_{i+1} = s_{j+1}.

You are given two positive integers n and k. Among all strings with length n that contain only the first k characters of the Latin alphabet, find a string with minimum possible cost. If there are multiple such strings with minimum cost — find any of them.

Input

The only line contains two integers n and k (1 ≤ n ≤ 2 ⋅ 10^5; 1 ≤ k ≤ 26).

Output

Print the string s such that it consists of n characters, each its character is one of the k first Latin letters, and it has the minimum possible cost among all these strings. If there are multiple such strings — print any of them.

Examples

Input


9 4


Output


aabacadbb


Input


5 1


Output


aaaaa

Input


10 26


Output


codeforces

Difficulty: MEDIUM_HARD
Tags: Graph algorithms

Constructive algorithms

String algorithms

Greedy algorithms

Complete search
Skill types: Complete search

Greedy algorithms

Starter code:

Solutions:
def createks(k):
	ks = ['a', 'a']
	if k == 1:
		return ks
	ks = ['a', 'a', 'b', 'b', 'a']
	if k == 2:
		return ks
	msd = 2
	while msd < k:
		ks.extend([chr(ord('a') + msd), chr(ord('a') + msd - 1), chr(ord('a') + msd)])
		for i in range(msd - 1):
			ks.extend(chr(ord('a') + msd))
			ks.extend(chr(ord('a') + (msd - (2 + i))))
		msd += 1
	return ks

def answer(n, k):
	ks = createks(k)
	ans = []
	extra = n - len(ks)
	for i in range(min(n, len(ks))):
		ans.append(ks[i])
	ks.pop(0)
	for i in range(extra):
		ans.append(ks[i % len(ks)])
	return ''.join(ans)

def main():
	(n, k) = [int(i) for i in input().split()]
	print(answer(n, k))
	return
main()


(n, k) = map(int, input().split())
C = 97
p = [0] * k
out = ['a']
F = k + k * (k - 1)
n -= 1
a_forbidden = False
for i in range(2, n + 2):
	if not i % F:
		a_forbidden = False
	cur = ord(out[-1]) - C
	if p[cur] == 0 and a_forbidden:
		p[cur] += 1
	out.append(chr(C + p[cur]))
	p[cur] += 1
	if p[cur] == k:
		p[cur] = 0
		if cur == 0:
			a_forbidden = True
print(''.join(out))


def funMin(k):
	(pref, suff) = ('', '')
	for i in range(ord('a'), ord('a') + k):
		pref += chr(i) * 2
		for j in range(i + 2, ord('a') + k):
			suff += chr(i) + chr(j)
	pref += suff
	for i in range(ord('a') + k - 2, ord('a') - 1, -1):
		pref += chr(i)
	return pref
(n, k) = map(int, input().split())
ans = funMin(k)
ext = ans[1:]
ans += ext * (n // len(ext))
print(ans[:n])


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import defaultdict as dd
import string
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdmap = lambda : map(int, stdstr().split())
stdarr = lambda : list(map(int, stdstr().split()))
mod = 1000000007
(n, k) = stdmap()
outer = 0
inner = 0
res = []
al = string.ascii_lowercase
for i in range(k):
	f = al[i % k]
	res.append(f)
	for j in range(i + 1, k):
		res.append(f + al[j])
min = ''.join(res)
ceil = math.ceil(n / len(min))
r = [min for _ in range(ceil)]
r = ''.join(r)
final = r[:n]
print(final)


(n, k) = map(int, input().split())
alpha = 'abcdefghijklmnopqrstuvwxyz'
if k >= n:
	print(alpha[:n])
else:
	alpha = [alpha[x] for x in range(k)]
	st = ''
	for i in range(k - 1):
		st += alpha[i]
		for j in range(i + 1, k):
			st += alpha[i] + alpha[j]
	st += alpha[-1]
	k1 = st * (n // len(st)) + st[:n % len(st)]
	print(k1)


import io
import os
from collections import Counter, defaultdict, deque

def getCost(s):
	N = len(s)
	cost = 0
	for i in range(N - 1):
		for j in range(i + 1, N - 1):
			if s[i] == s[j] and s[i + 1] == s[j + 1]:
				cost += 1
	return cost

def solveCost(N, K):
	import itertools
	costToStr = defaultdict(list)
	for s in itertools.product(*[range(0, K) for i in range(N)]):
		cost = getCost(s)
		costToStr[cost].append(s)
	best = min(costToStr.keys())
	print(numToStr(costToStr[best][0]))
	return best

def numToStr(arr):
	ordA = ord('a')
	return ''.join((chr(ordA + x) for x in arr))

def solve(N, K):
	rows = []
	for i in range(K):
		row = []
		for j in range(K):
			if j != i and j < i:
				continue
			row.append(j)
			row.append(i)
		rows.append(row)
	s = rows[0]
	for i in range(1, K):
		index = s.index(i)
		s[index:index + 1] = rows[i]
	freq = Counter(((x, y) for (x, y) in zip(s, s[1:])))
	assert all((v == 1 for v in freq.values()))
	assert len(freq) == K * K
	template = numToStr(s)
	ans = [template[:]]
	l = len(ans[0])
	while l < N:
		ans.append(template[1:])
		l += len(template) - 1
	assert l >= N
	ans = ''.join(ans)
	ans = ans[:N]
	assert len(ans) == N
	return ans
DEBUG = False
if DEBUG:
	for N in range(1, 100):
		for K in range(1, 4):
			ans1 = solveCost(N, K)
			ans = solve(N, K)
			assert len(ans) == N
			print((N, K), ans1, ans, getCost(ans))
			assert ans1 == getCost(ans)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = 1
for tc in range(1, TC + 1):
	(N, K) = [int(x) for x in input().split()]
	ans = solve(N, K)
	print(ans)


import sys
ints = (int(x) for x in sys.stdin.read().split())
sys.setrecursionlimit(3000)

def magic(N=26):
	ans = [None] * (N + 1)
	ans[1] = [(0, 0)]
	for k in range(2, N + 1):
		f = [(0, k - 1), (k - 1, k - 1), (k - 1, 0)]
		for (i, j) in ans[k - 1]:
			if i == j != 0:
				f.append((i, k - 1))
				f.append((k - 1, j))
			f.append((i, j))
		ans[k] = f
	return ans

def main():
	(n, k) = (next(ints) for i in range(2))
	f = [i for (i, j) in magic(k)[k]]
	f = ''.join((chr(97 + f[i]) for i in range(len(f))))
	ans = (f * (1 + n // len(f)))[:n]
	assert len(ans) == n
	print(ans)
	return
main()


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k) = map(int, input().split())
a = ['0'] * 1000
t = 0
for i in range(k):
	a[t] = chr(97 + i)
	t += 1
	for j in range(i + 1, k):
		a[t] = chr(97 + i)
		a[t + 1] = chr(97 + j)
		t += 2
if n <= t:
	print(''.join(a[:n]))
else:
	z = n // t
	print(''.join(a[:t]) * z + ''.join(a[:n % t]))


from collections import defaultdict

def f(s):
	b = []
	for j in s:
		b.append(j)
	return b
j = 1
val = [1] * 10
while j <= 30:
	res = len(str(2 ** j))
	if res <= 9 and val[res] == 1:
		val[res] = 2 ** j
	j += 1
j = 1
val1 = [1] * 10
while j <= 30:
	res = len(str(3 ** j))
	if res <= 9 and val1[res] == 1:
		val1[res] = 3 ** j
	j += 1
p = 10 ** 9 + 7
v = 1
for _ in range(v):
	(n, m) = map(int, input().split())
	res = []
	cnt = 0
	curr = 97
	while curr < 97 + m - 1:
		j = 97 + m - 1
		while j > curr:
			res.append(chr(curr))
			res.append(chr(j))
			j += -1
		curr += 1
	j = 97 + m - 1
	while j >= 97:
		res.append(chr(j))
		j += -1
	cnt = 1
	ans = ['a']
	l = len(res)
	curr = 0
	while cnt < n:
		ans.append(res[curr % l])
		curr += 1
		cnt += 1
	print(''.join(ans))


import sys
from collections import deque

def rl():
	return sys.stdin.readline().strip()

def rl_types(types):
	str_list = [x for x in sys.stdin.readline().strip().split(' ')]
	return [types[i](str_list[i]) for i in range(len(str_list))]

def pr(something):
	sys.stdout.write(str(something) + '\n')

def pra(array):
	sys.stdout.write(' '.join([str(x) for x in array]) + '\n')

def solve(array):
	return array

def plausible_ordering(k):
	letters = [chr(ord('a') + i) for i in range(k)]
	edges = {}
	for i in letters:
		for j in letters:
			edges[i + j] = [j + c for c in letters]
	start = 'aa'
	end = letters[-1] + 'a'

	def find_path(so_far_set, last, edges, goal):
		neighbs = edges[last]
		for n in [c for c in neighbs if not c in so_far_set]:
			so_far_set.add(n)
			if n == goal and len(so_far_set) == len(edges):
				return deque([goal])
			res = find_path(so_far_set, n, edges, goal)
			if res:
				res.appendleft(n)
				return res
			so_far_set.remove(n)
		return None
	ordering = find_path(set([start]), start, edges, end)
	ordering.appendleft(start)
	return ''.join([a[0] for a in ordering])
(n, k) = [int(x) for x in rl().split(' ')]
if k == 1:
	result = 'a' * n
else:
	order = plausible_ordering(k)
	olen = len(order)
	result = order * (n // olen + 1)
	result = result[:n]
pr(result)


(n, k) = map(int, input().split())
char = []
for i in range(k):
	char.append(chr(ord('a') + i))
curr1 = 0
curr2 = 0
ans = ''
i = 0
while i < n:
	ans += char[curr1]
	curr1 = (curr1 + 1) % k
	i += 1
	if curr1 == 0:
		curr2 = (curr2 + 1) % k
		curr1 = curr2
	elif i < n:
		ans += char[curr2]
		i += 1
print(ans)


(n, k) = map(int, input().split())
c = 'abcdefghijklmnopqrstuvwxyz'[:k]
unit = ''
for i in range(len(c)):
	unit += c[i]
	for j in range(i + 1, len(c)):
		unit += c[i] + c[j]
for i in range(n // len(unit)):
	print(unit, end='')
print(unit[:n % len(unit)])


(n, k) = map(int, input().split())
out = []
for i in range(k):
	out.append(chr(97 + i))
	for j in range(i + 1, k):
		out.append(chr(97 + i))
		out.append(chr(97 + j))
while len(out) < n:
	out += out
print(''.join(out[:n]))


import sys
input = sys.stdin.readline
l = input().split()
n = int(l[0])
k = int(l[1])
curr = 0
hashi = dict()
a = [0]
for i in range(k):
	for j in range(i, k):
		if j == (i + 1) % k:
			continue
		if j == i:
			a.append(i)
		else:
			a.append(j)
			a.append(i)
	if i != k - 1:
		a.append((i + 1) % k)
for i in range(k - 2, -1, -1):
	a.append(i)
for i in range(n):
	print(chr(ord('a') + a[i % (k * k)]), end='')


(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	ans += chr(97 + i)
	for j in range(i + 1, k):
		ans += chr(97 + i)
		ans += chr(97 + j)
while len(ans) < n:
	ans += ans
print(ans[:n])


(n, k) = map(int, input().split())
m = {0: '', 1: 'a', 2: 'aabb', 3: 'aabacbbcc', 4: 'aabacadbbcbdccdd', 5: 'aabacadaebbcbdbeccdceddee', 6: 'aabacadaeafbbcbdbebfccdcecfddedfeeff', 7: 'aabacadaeafagbbcbdbebfbgccdcecfcgddedfdgeefegffgg', 8: 'aabacadaeafagahbbcbdbebfbgbhccdcecfcgchddedfdgdheefegehffgfhgghh', 9: 'aabacadaeafagahaibbcbdbebfbgbhbiccdcecfcgchciddedfdgdhdieefegeheiffgfhfigghgihhii', 10: 'aabacadaeafagahaiajbbcbdbebfbgbhbibjccdcecfcgchcicjddedfdgdhdidjeefegeheiejffgfhfifjgghgigjhhihjiijj', 11: 'aabacadaeafagahaiajakbbcbdbebfbgbhbibjbkccdcecfcgchcicjckddedfdgdhdidjdkeefegeheiejekffgfhfifjfkgghgigjgkhhihjhkiijikjjkk', 12: 'aabacadaeafagahaiajakalbbcbdbebfbgbhbibjbkblccdcecfcgchcicjckclddedfdgdhdidjdkdleefegeheiejekelffgfhfifjfkflgghgigjgkglhhihjhkhliijikiljjkjlkkll', 13: 'aabacadaeafagahaiajakalambbcbdbebfbgbhbibjbkblbmccdcecfcgchcicjckclcmddedfdgdhdidjdkdldmeefegeheiejekelemffgfhfifjfkflfmgghgigjgkglgmhhihjhkhlhmiijikilimjjkjljmkklkmllmm', 14: 'aabacadaeafagahaiajakalamanbbcbdbebfbgbhbibjbkblbmbnccdcecfcgchcicjckclcmcnddedfdgdhdidjdkdldmdneefegeheiejekelemenffgfhfifjfkflfmfngghgigjgkglgmgnhhihjhkhlhmhniijikiliminjjkjljmjnkklkmknllmlnmmnn', 15: 'aabacadaeafagahaiajakalamanaobbcbdbebfbgbhbibjbkblbmbnboccdcecfcgchcicjckclcmcncoddedfdgdhdidjdkdldmdndoeefegeheiejekelemeneoffgfhfifjfkflfmfnfogghgigjgkglgmgngohhihjhkhlhmhnhoiijikiliminiojjkjljmjnjokklkmknkollmlnlommnmonnoo', 16: 'aabacadaeafagahaiajakalamanaoapbbcbdbebfbgbhbibjbkblbmbnbobpccdcecfcgchcicjckclcmcncocpddedfdgdhdidjdkdldmdndodpeefegeheiejekelemeneoepffgfhfifjfkflfmfnfofpgghgigjgkglgmgngogphhihjhkhlhmhnhohpiijikiliminioipjjkjljmjnjojpkklkmknkokpllmlnlolpmmnmompnnonpoopp', 17: 'aabacadaeafagahaiajakalamanaoapaqbbcbdbebfbgbhbibjbkblbmbnbobpbqccdcecfcgchcicjckclcmcncocpcqddedfdgdhdidjdkdldmdndodpdqeefegeheiejekelemeneoepeqffgfhfifjfkflfmfnfofpfqgghgigjgkglgmgngogpgqhhihjhkhlhmhnhohphqiijikiliminioipiqjjkjljmjnjojpjqkklkmknkokpkqllmlnlolplqmmnmompmqnnonpnqoopoqppqq', 18: 'aabacadaeafagahaiajakalamanaoapaqarbbcbdbebfbgbhbibjbkblbmbnbobpbqbrccdcecfcgchcicjckclcmcncocpcqcrddedfdgdhdidjdkdldmdndodpdqdreefegeheiejekelemeneoepeqerffgfhfifjfkflfmfnfofpfqfrgghgigjgkglgmgngogpgqgrhhihjhkhlhmhnhohphqhriijikiliminioipiqirjjkjljmjnjojpjqjrkklkmknkokpkqkrllmlnlolplqlrmmnmompmqmrnnonpnqnroopoqorppqprqqrr', 19: 'aabacadaeafagahaiajakalamanaoapaqarasbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsccdcecfcgchcicjckclcmcncocpcqcrcsddedfdgdhdidjdkdldmdndodpdqdrdseefegeheiejekelemeneoepeqeresffgfhfifjfkflfmfnfofpfqfrfsgghgigjgkglgmgngogpgqgrgshhihjhkhlhmhnhohphqhrhsiijikiliminioipiqirisjjkjljmjnjojpjqjrjskklkmknkokpkqkrksllmlnlolplqlrlsmmnmompmqmrmsnnonpnqnrnsoopoqorosppqprpsqqrqsrrss', 20: 'aabacadaeafagahaiajakalamanaoapaqarasatbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtccdcecfcgchcicjckclcmcncocpcqcrcsctddedfdgdhdidjdkdldmdndodpdqdrdsdteefegeheiejekelemeneoepeqeresetffgfhfifjfkflfmfnfofpfqfrfsftgghgigjgkglgmgngogpgqgrgsgthhihjhkhlhmhnhohphqhrhshtiijikiliminioipiqirisitjjkjljmjnjojpjqjrjsjtkklkmknkokpkqkrksktllmlnlolplqlrlsltmmnmompmqmrmsmtnnonpnqnrnsntoopoqorosotppqprpsptqqrqsqtrrsrtsstt', 21: 'aabacadaeafagahaiajakalamanaoapaqarasataubbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbuccdcecfcgchcicjckclcmcncocpcqcrcsctcuddedfdgdhdidjdkdldmdndodpdqdrdsdtdueefegeheiejekelemeneoepeqereseteuffgfhfifjfkflfmfnfofpfqfrfsftfugghgigjgkglgmgngogpgqgrgsgtguhhihjhkhlhmhnhohphqhrhshthuiijikiliminioipiqirisitiujjkjljmjnjojpjqjrjsjtjukklkmknkokpkqkrksktkullmlnlolplqlrlsltlummnmompmqmrmsmtmunnonpnqnrnsntnuoopoqorosotouppqprpsptpuqqrqsqtqurrsrtrusstsuttuu', 22: 'aabacadaeafagahaiajakalamanaoapaqarasatauavbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvccdcecfcgchcicjckclcmcncocpcqcrcsctcucvddedfdgdhdidjdkdldmdndodpdqdrdsdtdudveefegeheiejekelemeneoepeqereseteuevffgfhfifjfkflfmfnfofpfqfrfsftfufvgghgigjgkglgmgngogpgqgrgsgtgugvhhihjhkhlhmhnhohphqhrhshthuhviijikiliminioipiqirisitiuivjjkjljmjnjojpjqjrjsjtjujvkklkmknkokpkqkrksktkukvllmlnlolplqlrlsltlulvmmnmompmqmrmsmtmumvnnonpnqnrnsntnunvoopoqorosotouovppqprpsptpupvqqrqsqtquqvrrsrtrurvsstsusvttutvuuvv', 23: 'aabacadaeafagahaiajakalamanaoapaqarasatauavawbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdweefegeheiejekelemeneoepeqereseteuevewffgfhfifjfkflfmfnfofpfqfrfsftfufvfwgghgigjgkglgmgngogpgqgrgsgtgugvgwhhihjhkhlhmhnhohphqhrhshthuhvhwiijikiliminioipiqirisitiuiviwjjkjljmjnjojpjqjrjsjtjujvjwkklkmknkokpkqkrksktkukvkwllmlnlolplqlrlsltlulvlwmmnmompmqmrmsmtmumvmwnnonpnqnrnsntnunvnwoopoqorosotouovowppqprpsptpupvpwqqrqsqtquqvqwrrsrtrurvrwsstsusvswttutvtwuuvuwvvww', 24: 'aabacadaeafagahaiajakalamanaoapaqarasatauavawaxbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxeefegeheiejekelemeneoepeqereseteuevewexffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxgghgigjgkglgmgngogpgqgrgsgtgugvgwgxhhihjhkhlhmhnhohphqhrhshthuhvhwhxiijikiliminioipiqirisitiuiviwixjjkjljmjnjojpjqjrjsjtjujvjwjxkklkmknkokpkqkrksktkukvkwkxllmlnlolplqlrlsltlulvlwlxmmnmompmqmrmsmtmumvmwmxnnonpnqnrnsntnunvnwnxoopoqorosotouovowoxppqprpsptpupvpwpxqqrqsqtquqvqwqxrrsrtrurvrwrxsstsusvswsxttutvtwtxuuvuwuxvvwvxwwxx', 25: 'aabacadaeafagahaiajakalamanaoapaqarasatauavawaxaybbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbyccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdyeefegeheiejekelemeneoepeqereseteuevewexeyffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfygghgigjgkglgmgngogpgqgrgsgtgugvgwgxgyhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyiijikiliminioipiqirisitiuiviwixiyjjkjljmjnjojpjqjrjsjtjujvjwjxjykklkmknkokpkqkrksktkukvkwkxkyllmlnlolplqlrlsltlulvlwlxlymmnmompmqmrmsmtmumvmwmxmynnonpnqnrnsntnunvnwnxnyoopoqorosotouovowoxoyppqprpsptpupvpwpxpyqqrqsqtquqvqwqxqyrrsrtrurvrwrxrysstsusvswsxsyttutvtwtxtyuuvuwuxuyvvwvxvywwxwyxxyy', 26: 'aabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzeefegeheiejekelemeneoepeqereseteuevewexeyezffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzgghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhziijikiliminioipiqirisitiuiviwixiyizjjkjljmjnjojpjqjrjsjtjujvjwjxjyjzkklkmknkokpkqkrksktkukvkwkxkykzllmlnlolplqlrlsltlulvlwlxlylzmmnmompmqmrmsmtmumvmwmxmymznnonpnqnrnsntnunvnwnxnynzoopoqorosotouovowoxoyozppqprpsptpupvpwpxpypzqqrqsqtquqvqwqxqyqzrrsrtrurvrwrxryrzsstsusvswsxsyszttutvtwtxtytzuuvuwuxuyuzvvwvxvyvzwwxwywzxxyxzyyzz'}
ans = m[k]
if len(ans) >= n:
	print(ans[:n])
else:
	print((ans * (n // len(ans) + 1))[:n])


import sys
input = sys.stdin.buffer.readline
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rs = lambda : input().decode().rstrip('\n\r')
wrt = sys.stdout.write
fastop = lambda *args, end='\n': wrt(' '.join([str(x) for x in args]) + end)
op = print
xrange = lambda *args: reversed(range(*args))
cdiv = lambda x, y: -(-x // y)
enum = enumerate
inf = float('inf')
mod = 10 ** 9 + 7
from collections import defaultdict as dd, Counter
from heapq import *
from math import gcd
alp = 'abcdefghijklmnopqrstuvwxyz'
Testcase = 1
for testcase in range(Testcase):
	(n, k) = rl()
	ans = []
	for i in range(k):
		ans.append(alp[i])
		for j in range(i + 1, k):
			ans.append(alp[i])
			ans.append(alp[j])
	ans = ''.join(ans)
	ans = ans * (n // k + 2)
	print(ans[0:n])


(n, m) = list(map(int, input().split()))
ans = ''
kek = 97
bek = kek
while n > 0:
	if kek == 97 + m:
		kek = 97
	if m > 1:
		bek = kek + 1
	else:
		bek = kek
	ans += chr(kek)
	n -= 1
	while n > 0 and bek < 97 + m:
		ans += chr(kek)
		n -= 1
		if n > 0:
			ans += chr(bek)
		bek += 1
		n -= 1
	kek += 1
print(ans)


(n, k) = [int(i) for i in input().split()]
ans = ''
for x in range(k):
	ans += chr(x + 97) * 2
	for i in range(k):
		for j in range(k):
			tmp = chr(i + 97) + chr(j + 97)
			if ans.find(tmp) == -1:
				if len(ans) > 0:
					if ans.find(ans[-1] + tmp[0]) == -1:
						ans += tmp
	ans = ans[:len(ans) - 1]
if len(ans) > n:
	ans = ans[:n]
elif len(ans) < n:
	while len(ans) < n:
		tmp = str(ans)
		tmp[::-1]
		ans += tmp
		if len(ans) > n:
			break
	if len(ans) > n:
		ans = ans[:n]
print(ans)


from collections import defaultdict

def fun(s):
	n = len(s)
	cost = 0
	for i in range(n - 1):
		for j in range(i + 1, n - 1):
			if s[i] + s[i + 1] == s[j] + s[j + 1]:
				cost += 1
	return cost
(n, k) = map(int, input().split())
all = 'abcdefghijklmnopqrstuvwxyz'
s = ''
for i in range(k):
	s += all[i]
	for j in range(i + 1, k):
		s += all[i] + all[j]
while len(s) < n:
	s += s
print(s[:n])


import sys
import math
from collections import defaultdict, Counter, deque
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k) = map(int, input().split())
s = []
for i in range(k):
	if len(s) != n:
		s += [chr(i + 97)]
	for j in range(i + 1, k):
		if len(s) + 2 <= n:
			s += [chr(i + 97), chr(j + 97)]
		elif len(s) + 1 == n:
			s += [chr(i + 97)]
		else:
			break
need = n // len(s)
d = n - len(s) * need
ans = s * need + s[:d]
print(''.join(ans))


(n, k) = map(int, input().split())
u = []
for i in range(k):
	u.append(i)
	for j in range(i + 1, k):
		u.append(i)
		u.append(j)
L = len(u)
base = ''.join((chr(a + ord('a')) for a in u))
s = base * ((n + L - 1) // L)
print(s[:n])


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
(n, k) = mp()
S = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(k):
	ans += S[i]
	for j in range(i + 1, k):
		ans += S[i] + S[j]
print(ans * (n // k ** 2) + ans[:n % k ** 2])


(n, k) = [int(x) for x in input().split()]
count = 0
while True:
	for i in range(k):
		for j in range(i, k):
			if count <= n - 2:
				if i != j:
					print(chr(i + 97), end='')
					count += 1
				print(chr(j + 97), end='')
				count += 1
			elif count == n - 1:
				print(chr(i + 97), end='')
				count += 1
			else:
				break
		else:
			continue
		break
	else:
		continue
	break


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k) = map(int, input().split())
o = 97
l = ['a', 'a']
while o < 97 + k - 1:
	y = 97 + k - 1
	while y - o > 1:
		l.append(chr(y))
		l.append(chr(o))
		y -= 1
	l.append(chr(y))
	l.append(chr(y))
	o += 1
o -= 1
while o > 96:
	l.append(chr(o))
	o -= 1
ans = ''.join(l)
if k == 1:
	print('a' * n)
elif n <= len(l):
	print(ans[:n])
else:
	s = l.copy()
	l = l[1:]
	while len(s) + len(l) <= n:
		s.extend(l)
	i = 0
	while len(s) < n:
		s.append(l[i])
		i += 1
	print(''.join(s))


(n, k) = map(int, input().split())
arr = [set(list(range(k))) for i in range(k)]
ans = [0]
val = 'a'
for i in range(1, min(n, k ** 2)):
	x = arr[ans[i - 1]].pop()
	ans.append(x)
	val += chr(97 + x)
	if len(arr[ans[i - 1]]) == 0:
		for j in range(len(arr)):
			arr[j].discard(ans[i - 1])
val += 'a'
rep = val[1:]
ans = val + rep * (1 + (n - 1) // k ** 2)
ans = ans[:n]
print(ans)


from heapq import heapify, heappush, heappop, heappushpop
from collections import defaultdict as dd, deque as dq, Counter as C
from math import factorial as f, ceil, gcd, sqrt, log
from bisect import bisect_left as bl, bisect_right as br
from itertools import combinations as c, permutations as p
from math import factorial as f, ceil, gcd, sqrt, log
from sys import stdin
input = stdin.readline
mp = lambda : map(int, input().split())
it = lambda : int(input())
ls = lambda : list(input().strip())
mt = lambda r: [ls() for _ in range(r)]
lcm = lambda a, b: a * b // gcd(a, b)

def fibo_n(n):
	return ((1 + sqrt(5)) / 2) ** n / sqrt(5)
mod = 1000000007
mx = 2 * 10 ** 5 + 3
(a, b) = mp()

def solve(n, k):
	p = 0
	st = 97
	while 1:
		for i in range(k):
			ans[p] = chr(st + i)
			p += 1
			if p == n:
				return
			for j in range(i + 1, k):
				ans[p] = chr(st + i)
				p += 1
				if p == n:
					return
				ans[p] = chr(st + j)
				p += 1
				if p == n:
					return
ans = [None] * a
solve(a, b)
print(''.join(ans))


import string
(n, k) = list(map(int, input().split()))
s = ''
if k == 1:
	s = 'a' * n
else:
	lens = 0
	first = 0
	second = 0
	alphabet = list(string.ascii_lowercase)[:k]
	while lens < n:
		if lens != 0 and first == second == 0:
			repeats = n // lens
			tail = n - repeats * lens
			tails = s[:tail]
			s = s * repeats
			s += tails
			lens = n
		elif second == first:
			s += alphabet[first]
			lens += 1
			if second < k - 1:
				second += 1
			else:
				first = 0
				second = 0
		elif second < k:
			s += alphabet[first]
			lens += 1
			if lens != n:
				s += alphabet[second]
				lens += 1
			second += 1
		else:
			if first < k - 1:
				first += 1
			second = first
print(s)


(n, k) = map(int, input().split())
s = ''
for i in range(k):
	c = chr(97 + i)
	s += c
	for j in range(i + 1, k):
		s += c + chr(97 + j)
while len(s) < n:
	s *= 2
print(s[:n])


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
x = []
for i in range(k):
	x.append(i)
	x.append(i)
	for j in range(i + 2, k):
		x.append(j)
		x.append(i)
for i in range(k - 2, 0, -1):
	x.append(i)
y = [chr(i + 97) for i in x]
ans = []
for i in range(n):
	ans.append(y[i % len(x)])
ans = ''.join(ans)
print(ans)


(x, y) = [int(a) for a in input().split()]
ar = [y - 1] * y
i = 0
s = ''
while len(s) < x:
	s = s + chr(97 + i)
	t = ar[i]
	ar[i] = (ar[i] - 1 + y) % y
	i = t
print(s)


ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'

def solve(n, k):
	strs = ascii_lowercase[:k]
	if k == 1:
		return 'a' * n
	s = ''
	for i in range(k):
		s += strs[i]
		for j in range(i + 1, k):
			s += strs[i]
			s += strs[j]
	len_s = len(s)
	t = n // len_s + 1
	return (s * t)[:n]

def main():
	(n, k) = map(int, input().split(' '))
	print(solve(n, k))
main()


(n, k) = map(int, input().split())
s = ''
mat = [[0] * k for _ in range(k)]
c = [k] * k
curr = 0
a = ord('a')
while True:
	s += chr(a + curr)
	c[curr] -= 1
	for i in range(k):
		if not mat[curr][i] and c[i]:
			mat[curr][i] = 1
			curr = i
			break
	else:
		break
l = len(s)
print(s * (n // l) + s[:n % l])


import string
(n, k) = [int(i) for i in input().split()]
a = list(string.ascii_lowercase)
pr = 0
j1 = 0
for j in range(n):
	if pr == n:
		break
	if j1 == k:
		j1 = 0
	print(a[j1], end='')
	pr += 1
	if pr == n:
		break
	for i in range(j1, k):
		if i != j1:
			print(a[j1], end='')
			pr += 1
			if pr == n:
				break
			print(a[i], end='')
			pr += 1
			if pr == n:
				break
	j1 += 1


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
s = s[:k]
dic = {}
ans = ''
for i in range(k):
	ans += chr(97 + i)
	for j in range(i + 1, k):
		ans += chr(97 + i) + chr(97 + j)
m = len(ans)
ans = ans * (n // m) + ans[:n % m]
print(ans)


from sys import stdin
input = stdin.readline
(n, k) = map(int, input().split())
st = ''
for i in range(k):
	st += chr(97 + i)
	for j in range(i + 1, k):
		st += chr(97 + i) + chr(97 + j)
st = (st * (n // len(st) + 1))[:n]
print(st)


import sys

def putin():
	return map(int, sys.stdin.readline().split())

def sol():
	(n, k) = putin()
	n -= 1
	G = {}
	for i in range(k):
		G[i] = list(range(k))
	cur = 0
	cycle = ''
	while True:
		try:
			cycle += chr(ord('a') + (cur + G[cur][0]) % k)
			add = G[cur][0]
			G[cur].pop(0)
			cur += add
			cur %= k
		except Exception:
			break
	print('a', end='')
	for i in range(n):
		print(cycle[i % len(cycle)], end='')
sol()


import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
import string

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None
		self.BUFSIZE = 8192

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def get_int():
	return int(input())

def get_ints():
	return list(map(int, input().split(' ')))

def get_int_grid(n):
	return [get_ints() for _ in range(n)]

def get_str():
	return input().strip()

def get_strs():
	return get_str().split(' ')

def flat_list(arr):
	return [item for subarr in arr for item in subarr]

def yes_no(b):
	if b:
		return 'YES'
	else:
		return 'NO'

def binary_search(good, left, right, delta=1, right_true=False):
	limits = [left, right]
	while limits[1] - limits[0] > delta:
		if delta == 1:
			mid = sum(limits) // 2
		else:
			mid = sum(limits) / 2
		if good(mid):
			limits[int(right_true)] = mid
		else:
			limits[int(~right_true)] = mid
	if good(limits[int(right_true)]):
		return limits[int(right_true)]
	else:
		return False

def prefix_sums(a):
	p = [0]
	for x in a:
		p.append(p[-1] + x)
	return p

def solve_a():
	n = get_int()
	r = get_ints()
	return r.count(1) + r.count(3)

def solve_b():
	(a, b, c) = get_ints()
	swap = False
	if b > a:
		swap = True
		(a, b) = (b, a)
	x = 10 ** (a - 1)
	y = int('1' * (b - c + 1) + '0' * (c - 1))
	if swap:
		return (y, x)
	else:
		return (x, y)

def solve_c():
	(n, q) = get_ints()
	a = get_ints()
	a_max = max(a)
	t = get_ints()
	firsts = [-1 for _ in range(a_max)]
	for (i, v) in enumerate(a):
		if firsts[v - 1] == -1:
			firsts[v - 1] = i
	ans = []
	for q in t:
		q -= 1
		tmp = firsts[q]
		firsts[q] = 0
		ans.append(tmp + 1)
		for (i, x) in enumerate(firsts):
			if i != q and firsts[i] < tmp:
				firsts[i] += 1
	return ans

def solve_d():
	(n, k) = get_ints()
	path = [0]
	G = {j: [i for i in range(k)] for j in range(k)}
	while len(path) < k * k:
		curr = path[-1]
		foll = G[curr].pop()
		path.append(foll)
	ans = path * (n // len(path)) + path[:n % len(path)]
	alpha = list(string.ascii_lowercase)
	ans_alpha = [alpha[x] for x in ans]
	return ''.join(ans_alpha)
print(solve_d())


from string import ascii_lowercase as al
(n, k) = map(int, input().split())
seq = []
for i in range(k):
	seq.append(al[i])
	for j in range(i + 1, k):
		seq.extend([al[i], al[j]])
ans = []
for i in range(n):
	ans += seq[i % len(seq)]
print(''.join(ans))


a = list('abcdefghijklmnopqrstuvwxyz')
(n, k) = map(int, input().split())
if k >= n:
	print(*a[0:n], sep='')
else:
	ans = ''
	for i in range(k):
		ans += a[i]
		for j in range(i + 1, k):
			ans += a[i] + a[j]
	while n > len(ans):
		ans *= 2
	print(ans[0:n])


(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	temp = chr(ord('a') + i)
	ans += temp
	for j in range(i + 1, k):
		ans += temp + chr(ord('a') + j)
if len(ans) < n:
	while len(ans) < n:
		ans += ans
print(ans[:n])


from math import *
import time, sys
(n, k) = [int(i) for i in input().split()]
s = []
for i in range(k):
	for j in range(i, k):
		s.append(chr(ord('a') + j))
		if j != k - 1:
			s.append(chr(ord('a') + i))
ans = []
t = len(s)
for i in range(n // t):
	for j in s:
		ans.append(j)
for i in range(n % t):
	ans.append(s[i])
print(''.join(ans))


import sys
from collections import deque
input = sys.stdin.readline
output = sys.stdout.write

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def euler_path(i, adj, path):
	while len(adj[i]) > 0:
		j = adj[i].pop()
		euler_path(j, adj, path)
	path.appendleft(i)

def char(i):
	return chr(ord('a') + i)
[n, k] = inlt()
adj = [deque(range(0, k)) for _ in range(0, k)]
path = deque()
euler_path(0, adj, path)
snake_h = char(path.popleft())
snake = [char(i) for i in path]
output(snake_h)
n = n - 1
repeat = n // len(snake)
remain = n % len(snake)
snake_str = ''.join(snake)
for i in range(0, repeat):
	output(snake_str)
c = 0
for i in snake:
	if c < remain:
		output(i)
		c = c + 1
	else:
		break


def answer(n, k):
	a = ''
	s = 'abcdefghijklmnopqrstuvwxyz'
	for i in range(k):
		j = i
		while True:
			a += s[j]
			j += 1
			if j == k:
				break
			a += s[i]
	m = k * k
	return a * (n // m) + a[:n % m]
(n, k) = map(int, input().split())
print(answer(n, k))


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()
inf = 10 ** 16
md = 10 ** 9 + 7
(n, k) = LI()
cc = [[j % k for j in range(i, i + k)][::-1] for i in range(k)]
now = 0
aa = []
for _ in range(n):
	aa.append(now)
	if not cc[now]:
		break
	now = cc[now].pop()
if len(aa) < n:
	an = len(aa) - 1
	aa += aa[1:] * ((n + an - 1) // an - 1)
print(''.join((chr(a + 97) for a in aa[:n])))


import sys, heapq, math
from collections import defaultdict
input = sys.stdin.readline
(n, k) = map(int, input().split())
countarr = [[0 for _ in range(k)] for _ in range(k)]
res = ['a']
for i in range(1, n):
	row = ord(res[-1]) - 97
	mini = float('inf')
	col = -1
	for j in range(k):
		if countarr[row][j] <= mini:
			mini = countarr[row][j]
			col = j
	res.append(chr(97 + col))
	countarr[row][col] += 1
print(''.join(res))


import itertools, sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
(string, ans) = ('abcdefghijklmnopqrstuvwxyz', '')
for i in range(k):
	j = i
	while True:
		(ans, j) = (ans + string[j], j + 1)
		if j == k:
			break
		ans += string[i]
while len(ans) < n:
	ans *= 2
print(ans[:n])


s = []
(n, k) = list(map(int, input().split()))
for i in range(k):
	s.append(chr(97 + i))
	for j in range(i + 1, k):
		s.append(chr(97 + i))
		s.append(chr(97 + j))
sz = len(s)
for i in range(n):
	print(s[i % sz], end='')
print()


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, OrderedDict, deque
from functools import reduce
from operator import mul
maxx = float('inf')
localsys = 0
if path.exists('input.txt'):
	localsys = 1
	start_time = time.time()
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
input = sys.stdin.readline
(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	x = chr(i + 97)
	ans += x
	for j in range(i + 1, k):
		ans += x + chr(j + 97)
while len(ans) < n:
	ans *= 2
print(ans[:n])
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
from itertools import permutations
I = sys.stdin.readline
alpha = 'abcdefghijklmnopqrstuvwxyz'

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	elif n <= 2:
		return True
	else:
		for i in range(2, int(n ** 0.5) + 1):
			if n % i == 0:
				return False
		return True

def main():
	(n, k) = mi()
	if k == 1:
		print('a' * n)
	elif k >= n:
		print(alpha[:n])
	else:
		s = ''
		for i in range(k):
			s += alpha[i]
			for j in range(i + 1, k):
				s += alpha[i]
				s += alpha[j]
		s = s * (n // 2 + 2)
		s = s[:n]
		print(s)
main()


def dfs(v):
	global s0
	for u in range(k, 0, -1):
		if gr[v][u] == 1:
			gr[v][u] = 0
			dfs(u)
	s0 += [v]
s0 = []
(n, k) = map(int, input().split())
gr = [[1 for _ in range(k + 1)] for _ in range(k + 1)]
dfs(1)
s = ''
for i in s0:
	s += chr(i + 96)
i = 0
j = 0
while i < n:
	if j == len(s):
		j = 0
		if s[-1] == s[0]:
			j += 1
	print(s[j], end='')
	j += 1
	i += 1


import sys, functools, collections, bisect, math, heapq
import os
from io import BytesIO, IOBase
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
alpha = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(1):
	(n, k) = map(int, input().strip().split())
	d = collections.defaultdict(collections.deque)
	for i in range(k):
		for j in range(k):
			d[alpha[i]].append(alpha[j])
	cng = {}
	for i in range(k - 1):
		cng[alpha[i]] = alpha[i + 1]
	cng[alpha[k - 1]] = 'a'
	ans = ['a']
	while d[ans[-1]]:
		for x in d[ans[-1]]:
			if len(d[x]) > 0:
				d[ans[-1]].remove(x)
				ans.append(x)
				break
		else:
			temp = d[ans[-1]].pop()
			ans.append(temp)
	while len(ans) < n:
		ele = k ** 2
		curr = len(ans) - ele
		while ele:
			ans.append(ans[curr])
			curr += 1
			ele -= 1
			if len(ans) == n:
				break
	print(''.join((ans[i] for i in range(n))))


(n, k) = tuple(map(int, input().split()))
alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
d = {}
for i in range(k):
	d[alphabets[i]] = 0
if n == 1:
	print('a')
elif k == 1:
	print('a' * n)
elif n <= k * k:
	count = 1
	ans = ['a']
	while count < n:
		current = ans[-1]
		if d[current] == -1:
			inde = alphabets.index(current)
			j = (inde + 1) % k
			while d[alphabets[j]] == -1:
				j += 1
				if j >= k:
					j = 0
			current = alphabets[j]
		while d[alphabets[d[current]]] == -1:
			d[current] += 1
		ans.append(alphabets[d[current]])
		d[current] += 1
		if d[current] >= k:
			d[current] = -1
		count += 1
	print(''.join(ans))
else:
	count = 1
	ans = ['a']
	while count < k * k:
		current = ans[-1]
		if d[current] == -1:
			inde = alphabets.index(current)
			j = (inde + 1) % k
			while d[alphabets[j]] == -1:
				j += 1
				if j >= k:
					j = 0
			current = alphabets[j]
		while d[alphabets[d[current]]] == -1:
			d[current] += 1
		ans.append(alphabets[d[current]])
		d[current] += 1
		if d[current] >= k:
			d[current] = -1
		count += 1
	s = ''.join(ans)
	final_ans = n // len(s) * s
	i = 0
	while len(final_ans) < n:
		final_ans += s[i]
		i += 1
	print(final_ans)


import sys
input = sys.stdin.readline
(n, k) = map(int, input().split())
s1 = 'a'
from collections import *
al = defaultdict(int)
par = ''
s1 = ['a']
par = []
for i in range(k):
	par.append(chr(97 + i))
while len(s1) != n:
	flag = 0
	for j in range(k):
		x = ord(s1[-1])
		q = x - 97
		q += j
		q %= k
		if al[s1[-1] + par[q]] != 1:
			al[s1[-1] + par[q]] = 1
			s1.append(par[q])
			flag = 1
			break
	if flag == 0:
		al = defaultdict(int)
for i in range(len(s1)):
	print(s1[i], end='')


import time
import os, sys
from io import BytesIO, IOBase
from types import GeneratorType
from bisect import bisect_left, bisect_right
from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string, heapq as h
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def getInt():
	return int(input())

def getStrs():
	return input().split()

def getInts():
	return list(map(int, input().split()))

def getStr():
	return input()

def listStr():
	return list(input())

def getMat(n):
	return [getInts() for _ in range(n)]

def getBin():
	return list(map(int, list(input())))

def isInt(s):
	return '0' <= s[0] <= '9'

def ceil_(a, b):
	return a // b + (a % b > 0)
MOD = 10 ** 9 + 7

def solve():
	(N, K) = getInts()
	if K == 1:
		ans = ['a'] * N
		return ''.join(ans)
	ops = ['a']
	letters = string.ascii_lowercase[:K]
	for i in range(1, K):
		for j in range(1, i):
			ops.append(letters[i])
			ops.append(letters[j])
		ops.append(letters[i])
		ops.append(letters[i])
		ops.append('a')
	assert len(ops) == K * K
	ans = []
	curr = 0
	L = len(ops)
	while len(ans) < N:
		ans.append(ops[curr])
		curr = (curr + 1) % L
	return ''.join(ans)[:N]
print(solve())


(n, k) = map(int, input().split())
print('a', end='')
lis = []
for i in range(k):
	ch = chr(ord('a') + i)
	lis.append(ch)
	for j in range(i - 1, -1, -1):
		lis.append(ch)
		lis.append(chr(ord('a') + j))
n -= 1
for i in range(n):
	print(lis[i % len(lis)], end='')


def main():
	(N, K) = map(int, input().split())
	path = []
	cur = [0] * 26

	def dfs(u):
		while cur[u] < K:
			v = cur[u]
			cur[u] += 1
			dfs(v)
			path.append(v)
	dfs(0)
	print('a', end='')
	for i in range(N - 1):
		print(chr(path[i % len(path)] + ord('a')), end='')
main()


from sys import stdin, stdout, setrecursionlimit
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log, log2
from random import seed, randint
from datetime import datetime
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
from collections import defaultdict as dd
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def def_value():
	return 0

def def_inf():
	return inf

def atoi(s):
	return ord(s) - ord('a')

def inc(s, n=1):
	return chr((ord(s) - ord('a') + n) % 26 + ord('a'))
(n, k) = mp()
nxt = dd(int)
x = 'a'
for i in range(k):
	nxt[x] = ord('a') + (i + 1) % k
	x = chr(ord(x) + 1)
s = ''
x = 'a'
dis = k * k
for i in range(dis):
	s += x
	tmp = nxt[x]
	nxt[x] += 1
	x = chr((tmp - ord('a') + 1) % k + ord('a'))
ans = s * (n // dis)
ans += s[:n % dis]
print(ans)


def split(word):
	return [char for char in word]
(n, k) = map(int, input().split())
a = [[] for j in range(26)]
a[0] = 'a'
a[1] = 'abb'
a[2] = 'acbcc'
a[3] = 'adbdcdd'
a[4] = 'aebecedee'
a[5] = 'afbfcfdfeff'
a[6] = 'agbgcgdgegfgg'
a[7] = 'ahbhchdhehfhghh'
a[8] = 'aibicidieifigihii'
a[9] = 'ajbjcjdjejfjgjhjijj'
a[10] = 'akbkckdkekfkgkhkikjkk'
a[11] = 'alblcldlelflglhliljlkll'
a[12] = 'ambmcmdmemfmgmhmimjmkmlmm'
a[13] = 'anbncndnenfngnhninjnknlnmnn'
a[14] = 'aobocodoeofogohoiojokolomonoo'
a[15] = 'apbpcpdpepfpgphpipjpkplpmpnpopp'
a[16] = 'aqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqq'
a[17] = 'arbrcrdrerfrgrhrirjrkrlrmrnrorprqrr'
a[18] = 'asbscsdsesfsgshsisjskslsmsnsospsqsrss'
a[19] = 'atbtctdtetftgthtitjtktltmtntotptqtrtstt'
a[20] = 'aubucudueufuguhuiujukulumunuoupuqurusutuu'
a[21] = 'avbvcvdvevfvgvhvivjvkvlvmvnvovpvqvrvsvtvuvv'
a[22] = 'awbwcwdwewfwgwhwiwjwkwlwmwnwowpwqwrwswtwuwvww'
a[23] = 'axbxcxdxexfxgxhxixjxkxlxmxnxoxpxqxrxsxtxuxvxwxx'
a[24] = 'aybycydyeyfygyhyiyjykylymynyoypyqyrysytyuyvywyxyy'
a[25] = 'azbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzyzz'
s = ''
for j in range(k):
	s = s + a[j]
g = []
s = split(s)
l = len(s)
for j in range(n):
	g.append(s[j % l])
print(''.join(map(str, g)))


(n, k) = map(int, input().split())
l = []
for i in range(k):
	for j in range(i, k):
		l.append(chr(97 + i))
		if i != j:
			l.append(chr(97 + j))
if k == 1:
	l.append('a')
a = len(l)
t = n // a
s = ''.join(l)
print(s * t + s[:n % a])


from sys import stdin, stdout
input = stdin.readline
from string import ascii_lowercase

def main():
	t = 1
	for z in range(t):
		(n, k) = map(int, input().split())
		alph = ascii_lowercase
		ans = [''] * (k * (k + 1))
		num = 0
		for i in range(k):
			for j in range(i, k):
				ans[num + 1] = alph[i]
				ans[num] = alph[j]
				num += 2
			num -= 1
		ans = ''.join(ans)[:-1]
		n2 = len(ans)
		while n > 0:
			if n > n2:
				n -= n2
				print(ans, end='')
			else:
				print(ans[:n])
				break
main()


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
from random import shuffle
(n, k) = ip()
x = 'abcdefghijklmnopqrstuvwxyz'[:k]
st = []
for i in range(k):
	st.append(x[i])
	for j in range(i + 1, k):
		st.append(x[i])
		st.append(x[j])
s = ''.join(st)
while len(s) < n:
	s += s
print(s[:n])


def solvee(n, k):
	abc = 'abcdefghijklmnopqrstuvwxyz'
	if n == 1:
		return 'a'
	if n < k:
		return abc[:n]
	lis = []
	for x in range(0, k):
		lis.append(abc[x])
		for y in range(x + 1, k):
			lis.append(abc[x] + abc[y])
	ans = ''.join(lis)
	rem = n // len(ans)
	ans = ans * (rem + 1)
	return ans[:n]
(n, k) = map(int, input().split())
print(solvee(n, k))


(n, k) = map(int, input().rstrip().split(' '))
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
s = ''
for i in range(k):
	s += alpha[i]
	for j in range(i + 1, k):
		s += alpha[i]
		s += alpha[j]
		if len(s) > n:
			break
while len(s) < n:
	s *= n
print(s[:n])


(n, k) = map(int, input().split())
s = ''
for i in range(k):
	s += chr(ord('a') + i)
	for j in range(i + 1, k):
		s += chr(ord('a') + i) + chr(ord('a') + j)
while len(s) < n:
	s *= 2
print(s[:n])


(n, k) = map(int, input().split())
s = ''
for x in range(97, 97 + k):
	ch = chr(x)
	s = s + ch
	for j in range(x + 1, 97 + k):
		s += ch + chr(j)
size = len(s)
while size < n:
	s += s
	size = len(s)
print(s[0:n])


(n, k) = map(int, input().split())
ans = 'a'
cycle = 1
tmp = ''
if k == 1:
	print('a' * n)
elif k == 2:
	tmp = 'aabba'
	if n <= 5:
		print(tmp[:n])
	else:
		ans = tmp
		n -= 5
		while n >= 4:
			ans += tmp[1:]
			n -= 4
		if n > 0:
			ans += tmp[1:1 + n]
		print(ans)
else:
	tmp = 'aabba'
	cnt = 3
	while cnt <= k:
		cnt2 = 2
		while cnt2 <= cnt:
			tmp += chr(cnt - 1 + ord('a'))
			tmp += chr(cnt2 - 1 + ord('a'))
			cnt2 += 1
		tmp += 'a'
		cnt += 1
	if n <= len(tmp):
		print(tmp[:n])
	else:
		ans = tmp
		n -= len(tmp)
		while n >= len(tmp) - 1:
			ans += tmp[1:]
			n -= len(tmp) - 1
		if n > 0:
			ans += tmp[1:1 + n]
		print(ans)


(n, k) = [int(x) for x in input().split(' ')]
if k == 1:
	for i in range(n):
		print('a', end='')
	print()
else:
	a = []
	for i in range(k):
		a.append([tuple([i, j]) for j in range(k)])
	stat = [[-1 for j in range(k)] for i in range(k)]
	basicString = []

	def dfs(currI, currJ):
		global stat
		if stat[currI][currJ] == k * k:
			basicString.append([currI, currJ])
			return 1
		endingnode = currJ
		for itr in range(k):
			if stat[endingnode][itr] == -1:
				stat[endingnode][itr] = stat[currI][currJ] + 1
				res = dfs(endingnode, itr)
				if res == 1:
					basicString.append([currI, currJ])
					return 1
				stat[endingnode][itr] = -1
		return 0
	stat[0][1] = 1
	dfs(0, 1)
	basicString.reverse()
	bsT = []
	for x in basicString:
		bsT.append(x[0])
	for i in range(n):
		print(chr(bsT[i % len(bsT)] + 97), end='')
	print()


import sys
import bisect
input_ = lambda : sys.stdin.readline().strip('\r\n')
from math import log
from math import gcd
sa = lambda : input_()
sb = lambda : int(input_())
sc = lambda : input_().split()
sd = lambda : list(map(int, input_().split()))
se = lambda : float(input_())
sf = lambda : list(input_())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
gp = []
cost = []
dp = []
mx = []

def dfs(root, par):
	global gp, cost, dp
	dp[root] = cost[root]
	for i in gp[root]:
		if i == par:
			continue
		dfs(i, root)
		dp[root] = max(dp[root], dp[i])

def hnbhai():
	(n, k) = sd()
	a = []
	for i in range(k - 1):
		a.append(chr(97 + i))
		a.append(chr(97 + i))
		for j in range(i + 1, k - 1):
			a.append(chr(97 + j))
			a.append(chr(97 + i))
		a.append(chr(97 + k - 1))
	a.append(chr(97 + k - 1))
	x = a * (n // len(a)) + a[:n % len(a)]
	print(''.join(x))
for _ in range(1):
	hnbhai()


(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	ans = ans + chr(i + 97)
	for j in range(i + 1, k):
		ans = ans + chr(i + 97) + chr(j + 97)
n1 = len(ans)
n2 = n // n1
n3 = n % n1
fin = ans * n2
fin = fin + ans[:n3]
print(fin)


from itertools import combinations_with_replacement as combrep
from itertools import cycle
(n, k) = map(int, input().split())
alpha = (chr(x + ord('a')) for x in range(k))
repistring = cycle(combrep(alpha, 2))
i = 0
while i < n - 2:
	(a, b) = next(repistring)
	if a == b:
		print(a, end='')
		i += 1
	else:
		print(a, b, sep='', end='')
		i += 2
if i == n - 2:
	(a, b) = next(repistring)
	if a == b:
		print(a, end='')
		(a, b) = next(repistring)
		print(a)
	else:
		print(a, b, sep='')
elif i == n - 1:
	(a, b) = next(repistring)
	print(a)
else:
	print()


import sys
from sys import stdin
alp = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, stdin.readline().split())
s = []
for i in range(k):
	for j in range(k - 1, i + 1, -1):
		s.append(alp[i])
		s.append(alp[j])
	s.append(alp[i])
s.append(alp[k - 1])
for i in range(k - 2, -1, -1):
	s.append(alp[i])
	s.append(alp[i])
del s[-1]
ans = [s[i % len(s)] for i in range(n)]
print(''.join(ans))


from math import *
from sys import *
from bisect import *
from collections import *
(n, k) = map(int, stdin.readline().split())
v = ''
for i in range(k):
	s = chr(i + 97)
	v += s
	for j in range(i + 1, k):
		v += s + chr(j + 97)
while len(v) < n:
	v *= 2
print(v[:n])


from sys import stdin
input = stdin.readline

def solve(n, k):
	ans = []
	for c in range(k):
		ans.append(chr(c + 97))
		for i in range(1, k - c):
			ans.append(chr(c + 97))
			ans.append(chr(c + i + 97))
	if len(ans) < n:
		ans = ans * (n // len(ans) + 1)
	ans = ans[:n]
	print(*ans, sep='')
(n, k) = [int(x) for x in input().split()]
solve(n, k)


(n, k) = map(int, input().split())
pat = []
for i in range(k):
	pat.append('a')
	for j in range(i, 0, -1):
		pat.append(chr(j + ord('a')))
		pat.append(chr(i + ord('a')))
ans = []
for i in range(n):
	ans.append(pat[i % len(pat)])
print(*ans, sep='')


import os, sys
from io import BytesIO, IOBase
from collections import deque, Counter, defaultdict as dft
from heapq import heappop, heappush
from math import log, sqrt, factorial, cos, tan, sin, radians, log2, ceil, floor, gcd
from bisect import bisect, bisect_left, bisect_right
from decimal import *
import sys, threading
from itertools import permutations, combinations
from copy import deepcopy
input = sys.stdin.readline
ii = lambda : int(input())
si = lambda : input().rstrip()
mp = lambda : map(int, input().split())
ms = lambda : map(str, input().strip().split(' '))
ml = lambda : list(mp())
mf = lambda : map(float, input().split())
alphs = 'abcdefghijklmnopqrstuvwxyz'

def solve():
	(n, k) = mp()
	s = alphs[:k]
	if k == 1:
		print('a' * n)
		return
	if n == 1:
		print('a')
		return
	res = []
	ls = []
	for i in range(k):
		res.append(s[i])
		for j in range(i + 1, k):
			res.append(s[i] + s[j])
	ans = ''.join(res)
	ln = len(ans)
	temp = ans * (n // ln) + ans[:n % ln]
	print(temp)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
tc = 1
for i in range(tc):
	solve()


from __future__ import division, print_function
import math
import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
alp = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
(n, k) = invr()
l1 = []
for i in range(k):
	for j in range(i, k):
		if i == j:
			l1.append(alp[i])
			continue
		l1.append(alp[i] + alp[j])
s = ''.join(l1)
v = n // k + 1
ans = s * v
print(ans[:n])


from math import ceil
(n, m) = (int(x) for x in input().split())
come = 0
s = []
if m == 1:
	l = ['a'] * n
	come = 1
if come == 0:
	l = []
	for i in range(m):
		l.append(chr(97 + i))
		for j in range(i + 1, m):
			l.append(chr(97 + i))
			l.append(chr(97 + j))
	j = ceil(n / len(l))
	l *= j
print(''.join(l)[:n])


import math
NO = 'NO'
YES = 'YES'
MOD = 1000000007
ALPH = 'abcdefghijklmnopqrstuvwxyz'

def input_int():
	return int(input())

def input_list():
	return input().split(' ')

def input_list_int():
	return list(map(int, input_list()))

def z_func(s):
	n = len(s)
	z = [0] * n
	l = r = 0
	for i in range(1, n):
		if r >= i:
			z[i] = min(z[i - l], r - i + 1)
		while z[i] + i < n and s[z[i]] == s[z[i] + i]:
			z[i] += 1
		if i + z[i] - 1 > r:
			l = i
			r = i + z[i] - 15
	return z
global_ans = []

def pr(a):
	global_ans.append(a)

def calc(s):
	l = len(s)
	ans = 0
	for i in range(l):
		for j in range(i + 1, l):
			if j + 1 < l and s[i] == s[j] and (s[i + 1] == s[j + 1]):
				ans += 1
	print(ans)

def solve():
	(n, k) = input_list_int()
	tmp = {}
	tmp_idx = {}
	alph = ALPH[0:k]
	for i in range(k):
		w = ALPH[i]
		tmp[w] = alph
		tmp_idx[w] = i
	ans = 'a'
	last = 'a'
	for i in range(n - 1):
		nxt = tmp[last][tmp_idx[last]]
		tmp_idx[last] += 1
		if tmp_idx[last] >= k:
			tmp_idx[last] = 0
		ans += nxt
		last = nxt
	pr(ans)
query_count = 1
while query_count:
	query_count -= 1
	solve()
for global_ans_line in global_ans:
	print(global_ans_line)


import random
import sys

def input():
	return sys.stdin.readline().rstrip()

def slv(n, k):

	def construct(K):
		if K == 1:
			return [1, 1]
		else:
			tmp = [1, K]
			for j in range(K - 1, 1, -1):
				tmp.append(K)
				tmp.append(j)
			tmp.append(K)
			return tmp + construct(K - 1)
	tmpans = construct(k)[:-1] * (n // (k * k) + 10)
	assert all((v <= k for v in tmpans))
	ans = list(map(lambda x: chr(x + ord('a') - 1), tmpans))[:n]
	print(''.join(ans))
	return

def main():
	(n, k) = map(int, input().split())
	slv(n, k)
	return
main()


import sys
from collections import deque
i2a = {i: chr(97 + i) for i in range(26)}
a2i = {chr(97 + i): i for i in range(26)}
(n, k) = map(int, sys.stdin.readline().split())
list_a = [deque([i2a[(i + j) % k] for j in range(k)]) for i in range(26)]
list_res = ['a']
for i in range(1, n):
	key = list_a[a2i[list_res[-1]]].popleft()
	list_a[a2i[list_res[-1]]].append(key)
	list_res.append(key)
print(''.join(list_res))


def evaluate(s):
	n = len(s)
	res = 0
	for i in range(n):
		for j in range(i + 1, n - 1):
			if s[i:i + 2] == s[j:j + 2]:
				res += 1
	return res
(n, k) = map(int, input().split())
alphabet = 'abcdefghijklmnopqrstuvwxyz'[:k]
digrams = set()
res = ['a']
for i in range(1, n):
	last_letter = res[-1]
	for c in alphabet:
		if c + alphabet[-1] in digrams:
			continue
		d = last_letter + c
		if d not in digrams:
			new_letter = c
			digrams.add(d)
			break
	else:
		digrams = set()
		new_letter = 'a'
	res.append(new_letter)
print(*res, sep='')


import sys
import math
import random
input = sys.stdin.readline
(n, k) = map(int, input().split())
ans = [k - 1]
c = [[0 for i in range(k)] for j in range(k)]
for i in range(min(n, k * k) - 1):
	for j in range(k):
		if c[ans[-1]][j] == 0:
			c[ans[-1]][j] = 1
			ans.append(j)
			break
l = len(ans)
a = ans * (n // l)
if n % l != 0:
	a.extend(ans[:n % l])
l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(n):
	a[i] = l[a[i]]
print(''.join(a))


(n, k) = map(int, input().split())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
s = ''
for i in range(k):
	s += alphabet[i]
	for j in range(i + 1, k):
		s += alphabet[i] + alphabet[j]
blk = n // len(s)
small = n % len(s)
print(s * blk + s[:small])


(N, K) = map(int, input().split())
lis = [i for i in range(K)]
st = [0]
for _ in range(K * K - 1):
	st.append(lis[st[-1]])
	lis[st[-2]] += 1
	lis[st[-2]] %= K
st = ''.join(map(lambda x: chr(x + ord('a')), st))
print(st * (N // (K * K)) + st[:N % (K * K)])


(n, k) = map(int, input().split())
now = [i for i in range(k)]
ans = [0]
num = 0
for i in range(n - 1):
	x = num
	num = now[num]
	ans.append(num)
	now[x] += 1
	now[x] %= k
a = ord('a')
ans = [chr(a + i) for i in ans]
print(''.join(ans))


def main():
	(n, k) = map(int, input().split())
	chars = 'abcdefghijklmnopqrstuvwxyz'
	ans = ''
	i = 0
	counter = 0
	while i < k - 1 and counter < n:
		j = i
		while j < k and counter < n:
			if j == i:
				ans = ans + chars[i]
				counter += 1
				j += 1
				continue
			ans = ans + chars[i] + chars[j]
			j += 1
			counter += 2
		i += 1
	ans = ans + chars[i] + chars[0]
	counter += 2
	ans = ans[:n]
	con = ans
	if n > counter:
		m = int(n / counter)
		p = n % counter
		for m_i in range(m - 1):
			ans += con[1:]
			p += 1
		ans += ans[1:p + 1]
	print(ans)
main()


rr = input
rri = lambda : int(rr())
rrm = lambda : list(map(int, rr().split()))
(n, k) = rrm()
s = []
for i in range(k):
	s.append(chr(97 + i))
	for j in range(i + 1, k):
		s.append(chr(97 + i))
		s.append(chr(97 + j))
s = ''.join(s)
loop = len(s)
curr = 0
while curr + loop < n:
	print(s, end='')
	curr += loop
print(s[:n - curr])