Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. 

Innokentiy decides that new password should satisfy the following conditions:  the length of the password must be equal to n,  the password should consist only of lowercase Latin letters,  the number of distinct symbols in the password must be equal to k,  any two consecutive symbols in the password must be distinct. 

Your task is to help Innokentiy and to invent a new password which will satisfy all given conditions. 


-----Input-----

The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. 

Pay attention that a desired new password always exists.


-----Output-----

Print any password which satisfies all conditions given by Innokentiy.


-----Examples-----
Input
4 3

Output
java

Input
6 6

Output
python

Input
5 2

Output
phphp



-----Note-----

In the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.

In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase letters.

In the third test there is one of the appropriate new passwords — phphp, because its length is equal to 5 and 2 distinct lowercase letters p and h are used in it.

Pay attention the condition that no two identical symbols are consecutive is correct for all appropriate passwords in tests.

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
(n, k) = list(map(int, input().split()))
letters = list(map(chr, range(97, 123)))
sol = ''.join(letters[0:k] * n)
print(sol[0:n])


(n, k) = map(int, input().split())
a = [chr(i) for i in range(ord('a'), ord('a') + k)]
a = ''.join(a)
s = a * (n // k) + a[:n % k]
print(s)


import random
d = [int(d) for d in input().split()]
a = ['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 = []
word = ''
while len(word) != d[0]:
	x = random.randint(0, 25)
	if a[x] not in s and len(s) < d[1]:
		s.append(a[x])
		word += a[x]
	elif len(s) == d[1]:
		c = random.choice(s)
		if c != word[-1]:
			word += c
print(word)


(n, k) = list(map(int, input().split()))
s = 'qwertyuiopasdfghjklzxcvbnm'
a = s[:k]
if (n - k) % 2 == 0:
	for i in range(int((n - k) / 2)):
		a = a + s[:2]
else:
	for i in range(int((n - k) / 2)):
		a = a + s[:2]
	a = a + s[0]
print(a)


inp = input()
n = int(inp.split()[0])
k = int(inp.split()[1])
alpha = 'qwertyuioplkjhgfdsazxcvbnm'
use = alpha[0:k]
res = ''
for i in range(k):
	res += use[i]
import math
a = n / k
q = math.floor(a)
r = round((a - q) * k)
fres = q * res
for i in range(r):
	fres += res[i]
print(fres)


(n, k) = map(int, input().split())
last = list(map(chr, range(ord('a'), ord('a') + k)))
p = 0
for i in range(n):
	print(last[p], end='')
	p = (p + 1) % len(last)


(n, k) = map(int, input().split())
password = ''
for i in range(n - k + 2):
	if i % 2 == 0:
		password += 'a'
	else:
		password += 'b'
for i in range(k - 2):
	password += chr(ord('c') + i)
print(password)


(n, k) = map(int, input().split())
if k > 26:
	k = 26
m = ('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')
i = 0
s = ''
c = ''
while i < k:
	s += m[i]
	i += 1
i = 0
while i < n % k:
	c += m[i]
	i += 1
print(s * (n // k) + c)


(x, y) = input().split()
(x, y) = (int(x), int(y))
str1 = str()
i = 0
while len(str1) < x:
	if i >= y:
		i = 0
	str1 += chr(97 + i)
	i += 1
print(str1)


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
print((a[:k] * n)[:n])


import sys
length = 0
distinct = 0
letters = ['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 line in sys.stdin:
	line = line.split()
	length = int(line[0])
	distinct = int(line[1])
	break
new_pass = ''
letters_to_use = letters[:distinct]
idx = 0
for i in range(length):
	if idx >= len(letters_to_use):
		idx = 0
	new_pass += letters_to_use[idx]
	idx += 1
print(new_pass)


(n, m) = map(int, input().split())
print(('abcdefghijklmnopqrstuvwxyz'[:m] * n)[:n])


numbers = [int(i) for i in input().split()]
n = numbers[0]
k = numbers[1]
letters = 'abcdefghijklmnopqrstuvwxyz'
reps = n // k
remains = n % k
if n < 26:
	password = letters[0:n + 1]
	new_password = password[0:k] * reps + password[0:remains]
	print(new_password)
else:
	reps1 = n // 26
	remains1 = n % 26
	password = letters[0:26] * reps1 + letters[0:remains1]
	new_password = password[0:k] * reps + password[0:remains]
	print(new_password)


import io, os
import sys
from atexit import register
import string
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
sys.stdout = io.BytesIO()
register(lambda : os.write(1, sys.stdout.getvalue()))
tokens = []
tokens_next = 0

def nextStr():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	if type(tokens[tokens_next - 1]) == str:
		return tokens[tokens_next - 1]
	return tokens[tokens_next - 1].decode()

def nextInt():
	return int(nextStr())

def nextIntArr(n):
	return [nextInt() for i in range(n)]

def print(s, end='\n'):
	sys.stdout.write((str(s) + end).encode())
n = nextInt()
k = nextInt()
chars = string.ascii_lowercase[:k]
chars = list(chars)
for i in range(n):
	print(chars[i % k], '')


(a, b) = map(int, input().split())
for i in range(a):
	print(chr(97 + i % b), end='')


(m, n) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
s = a[0:n] * (m // n)
s += a[0:m % n]
print(s)


(n, k) = map(lambda x: int(x), input().split(' '))
s = [chr(97 + i) for i in range(k)]
ans = []
for i in range(n):
	ans.append(s[i % len(s)])
print(str.join('', ans))


(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	ans += chr(97 + i)
ans *= 100
print(ans[:n])


import sys
(a, b) = input().split()
a = int(a)
b = int(b)
s = ''
d = 'a'
if a == 1 and b == 1:
	print('a')
	sys.exit()
for x in range(b):
	s += d
	d = chr(ord(d) + 1)
ret = ''
while len(ret) < a:
	ret += s
print(ret[0:a])


from string import ascii_lowercase as letters
import random
(n, k) = [int(x) for x in input().split()]
password = ''
l = [str(x) for x in random.sample(letters, k)]
for i in l:
	password += i
for i in range(0, n - k):
	password += password[i]
print(password)


import string
l = list(string.ascii_lowercase)
(n, k) = [int(x) for x in input().split()]
ans = l[:k] * (n // k)
ans += ans[:n % k]
print(''.join(ans))


(n, k) = map(int, input().split())
l = 'abcdefghijklmnopqrstuvwxyz'
a = ''
for i in range(n):
	a = a + l[i % k]
print(a)


import random
import string
import math
(n, k) = map(int, input().split())
s = string.ascii_letters
h = ''
for j in range(k):
	h = h + s[j]
m = n / k
m = math.ceil(m)
a = h * m
c = ''
for i in range(n):
	c = c + a[i]
print(c)


(n, k) = map(int, input().split())
lst = []
for i in range(n):
	lst.append(chr(ord('a') + i % k))
result_str = ''.join((i for i in lst))
print(result_str)


(n, k) = list(map(int, input().split()))
b = 'abcdefghijklmnopqrstuvwxyz'
c = b[:k]
print(c * (n // k), c[:n % k], sep='')


stri = 'abcdefghijklmnopqrstuvwxyz'
mod = 0
strj = ''
(x, y) = map(int, input().split())
for i in range(x // y):
	strj += stri[0:y]
if x % y != 0:
	mod = x % y
	strj += stri[0:mod]
print(strj)


(n, k) = map(int, input().split())
alph = 'qwertyuiopasdfghjklzxcvbnm'
f = alph[:k] * 100
print(f[:n])


from string import ascii_lowercase
from random import randrange
(n, k) = map(int, input().split())
letters = list(ascii_lowercase)
indces = list(range(min(n, 26)))
choices = []
for i in range(k):
	choices.append(letters[indces.pop(randrange(len(indces)))])
pas = []
for i in range(n):
	pas.append(choices[i % k])
print(''.join(pas))


s = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
temp = s[:k]
t = n // k
if n % k == 0:
	print(t * temp)
else:
	ans = t * temp + temp
	print(ans[:n])


(n, k) = map(int, input().split())
z = ['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']
list = []
for i in range(k):
	list.append(z[i])
for i in range(n - k):
	list.append(list[i])
for i in range(1):
	for j in range(len(list)):
		print(list[j], end='')


import string
(n, k) = map(int, input().split())
a = list(string.ascii_lowercase)
f = str()
i = 0
while len(f) != n:
	if i < k:
		f += a[i]
		i += 1
	else:
		i = 0
print(f)


import string
(n, k) = (int(x) for x in input().split())
symbols = string.ascii_lowercase[0:k]
if n > k:
	symbols *= n // k + 1
pwd = symbols[0:n]
print(pwd)


(n, k) = [int(x) for x in input().split()]
a = 97
s = ''
for i in range(k):
	s = s + chr(a + i)
for r in range(n - k):
	if r % 2 == 0:
		s = s + 'a'
	else:
		s = s + 'b'
print(s)


import sys
input = sys.stdin.readline
output = sys.stdout

def solve(n, k):
	new = []
	l = [chr(x) for x in range(97, 97 + k)]
	for i in range(n):
		new.append(l[i % k])
	output.write(''.join(new) + '\n')
n = list(map(int, input().split()))
solve(n[0], n[1])


(n, k) = [int(x) for x in input().split()]
kc = k
alfabeto = list('abcdefghijklmnopqrstuvwxyz')
passw = ''
i = 0
while kc > 0:
	passw += alfabeto[i]
	kc -= 1
	i += 1
i = 0
while len(passw) < n:
	passw += passw[i]
	i += 1
print(passw)


import random
num = list(map(int, input().split()))
s = ''
for i in range(0, num[0]):
	s += chr(ord('a') + i % num[1])
print(s)


(n, k) = map(int, input().split())
chars = [chr(ord('a') + i) for i in range(k)]
sub = ''.join(chars)
res = sub * (n // k) + sub[:n % k]
print(res)


(n, k) = input().split()
print(''.join([chr(97 + i % int(k)) for i in range(int(n))]))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		(n, k) = LI()
		t = string.ascii_lowercase[:k]
		r = t * (n // k) + t[:n % k]
		rr.append(r)
	return JA(rr, '\n')
print(main())


import string
letters = list(string.ascii_lowercase)
(x, k) = map(int, input().split())
password = ''
for i in range(x):
	if i + 1 <= k:
		password = password + letters[i]
	else:
		password = password + letters[i - i // k * k]
print(password)


import string
ascii_letters = string.ascii_letters
(n, k) = map(int, input().split())
ascii_letters = ascii_letters[0:k]
res = ascii_letters
if n > k:
	res = res * (n // k) + res[0:n % k]
print(res)


import string
import random
(n, k) = input().split()
letters = []
str = ''
n = int(n)
k = int(k)
t = 0
for i in range(n):
	if t == k:
		while True:
			z = random.choice(letters)
			if z != letters[i - 1]:
				letters.append(z)
				break
	else:
		while True:
			if i == 0:
				z = random.choice(string.ascii_lowercase)
				letters.append(z)
				t = t + 1
				break
			else:
				z = random.choice(string.ascii_lowercase)
				if z not in letters:
					letters.append(z)
					t = t + 1
					break
print(str.join(letters))


import string
alphabet = list(string.ascii_lowercase)
(n, k) = map(int, input().split())
for i in range(n):
	print(alphabet[i % k], end='')
print()


from string import ascii_letters
(n, k) = map(int, input().split())
l = ascii_letters
a = ''
for i in range(n):
	a = a + l[i % k]
print(a)


(n, m) = list(map(int, input().strip().split()))
l = []
for i in range(97, 97 + m):
	l.append(chr(i))
for i in range(0, n):
	print(l[i % m], end='')


string = str(input())
arr = string.split()
n = int(arr[0])
k = int(arr[1])
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']
arr2 = []
for i in range(k):
	arr2.append(alpha[i % 26])
a = n - k
ans = ''
for i in arr2:
	ans += i
for i in range(a):
	ans += arr2[i % k]
print(ans)


from math import floor, sqrt
from sys import stdin
for _ in range(1):
	(n, k) = map(int, input().split())
	password = ''
	j = 0
	for i in range(n):
		password = password + chr(97 + j % k)
		j += 1
	print(password)


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = s[0:k] + 'ab' * (n - k)
print(ans[0:n])


(n, k) = map(int, input().split())
(i, j) = (0, 0)
while i < n:
	if j < k:
		print(chr(97 + j), end='')
	else:
		print('a', end='')
		j = 0
	i += 1
	j += 1


(n, k) = list(map(int, input().split()))
chars = ['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']
use_chars = chars[:k]
password = ' '
x = 0
for char_i in range(1, n + 1):
	current_char = use_chars[x]
	if password[char_i - 1] == current_char:
		current_char = use_chars[x]
	if x + 1 == k:
		x = 0
	else:
		x += 1
	password += current_char
print(password[1:])


a = list(map(int, input().split()))
n = a[0]
k = a[1]
alph = 'abcdefghijklmnopqrstuvwxyz'
hi = n // k
hg = n % k
result = hi * alph[:k] + alph[:hg]
print(result)


import sys
(n, k) = input().split()
n = int(n)
k = int(k)
s = ''
d = 'a'
if k >= 2:
	for x in range(k):
		s += d
		d = chr(ord(d) + 1)
	ret = ''
	while len(ret) < n:
		ret += s
	print(ret[0:n])


z = list(map(int, input().split()))
a = ''
c = 0
for i in range(97, 123):
	a += chr(97 + c)
	c += 1
	if c == z[1]:
		break
while len(a) != z[0]:
	a += a[:z[0] - len(a)]
print(a)


from random import randint
data = input().split(' ')
long = int(data[0])
different = int(data[1])
possibilities = []
while len(possibilities) < different:
	var = chr(randint(97, 122))
	if possibilities.count(var) == 0:
		possibilities.append(var)
result = ''
while len(result) < long:
	for x in possibilities:
		if len(result) >= long:
			break
		result += x
print(result)


bkvs = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = (int(i) for i in input().split())
cp = n // k
ost = n % k
print(bkvs[:k] * cp + bkvs[:ost])


(n, k) = map(int, input().split())
a = 'qwertyuiopasdfghjklzxcvbnm'
print(a[:k] * (n // k) + a[:n % k])


(lengthOfPassword, noOfDistinctSymbols) = [int(x) for x in input().split(' ')]
password = ''
possibleChars = ' abcdefghijklmnopqrstuvwxyz'
noOfDistinctSymbolsInPassword = 0
for i in range(lengthOfPassword):
	if noOfDistinctSymbolsInPassword < noOfDistinctSymbols:
		noOfDistinctSymbolsInPassword += 1
		password += possibleChars[noOfDistinctSymbolsInPassword]
	elif noOfDistinctSymbols % 2 == 0:
		if i % 2 == 0:
			password += possibleChars[noOfDistinctSymbolsInPassword - 1]
		else:
			password += possibleChars[noOfDistinctSymbolsInPassword]
	elif i % 2 == 0:
		password += possibleChars[noOfDistinctSymbolsInPassword]
	else:
		password += possibleChars[noOfDistinctSymbolsInPassword - 1]
print(password)


(n, k) = map(int, input().split())
y = ''
for i in range(n):
	y += chr(97 + i % k)
print(y)


letters = [chr(i) for i in range(97, 123)]
(n, k) = map(int, input().split())
password = ''
for i in range(n):
	cur = i % k
	password += letters[cur]
print(password)


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
i = 0
j = 0
s = ''
while i < n:
	s += a[j]
	i += 1
	j += 1
	if j == k:
		j = 0
print(s)


def list_from_input():
	return list(map(int, input().split()))
from string import ascii_lowercase

def main():
	(n, k) = list_from_input()
	password_range = ascii_lowercase[:k]
	password = ''
	i = 0
	while len(password) < n:
		password += password_range[i % k]
		i += 1
	print(password)
main()


x = input()
x = list(map(int, x.strip().split()))
n = x[0]
k = x[1]
count = 0
output = ''
for i in range(n):
	if count < k - 1:
		output = output + chr(ord('a') + count)
		count += 1
	else:
		output = output + chr(ord('a') + count)
		count = 0
print(str(output))


def t(val):
	return chr(ord('a') + val)
(n, k) = map(int, input().split())
res = list()
for i in range(k):
	res.append(t(i))
for i in range(n - k):
	res.append(t(i % 2))
print(''.join(res))


b = input().split()
s = 'abcdefghijklmnopqrstuvwxyz'
g = int(b[0])
f = int(b[1])
d = []
while len(d) < g:
	i = 0
	while i < f:
		if len(d) == g:
			break
		d.append(s[i])
		i = i + 1
print(''.join(d))


from string import ascii_lowercase as a
from itertools import cycle
(n, k) = map(int, input().split())
c = cycle(a[:k])
for i in range(n):
	print(next(c), end='')


(n, k) = map(int, input().split())
password = 'ab'
add = ord('c')
for i in range(2, n):
	if k > i:
		password += chr(add)
		add += 1
	else:
		password += password[i - 2]
print(password)


(a, b) = [int(x) for x in input().split(' ')]
print(('abcdefghijklmnopqrstuvwxyz'[:b] * 100)[:a])


(n, k) = list(map(int, input().split()))
s = 'abcdefghijklmnopqrstuvwxyz'
res = ''
for i in range(n):
	res += s[i % k]
print(res)


from string import ascii_lowercase
import random
(n, k) = [int(v) for v in input().split()]
chars = random.sample(ascii_lowercase, k)
print(''.join((chars[i % k] for i in range(n))))


a = input().split()
(n, k) = (int(a[0]), int(a[1]))
s = 'qwertyuioplkjhgfdsazxcvbnm'
s = s[0:k]
otvet = ''
for i in range(n // k):
	otvet += s
otvet += s[0:n % k]
print(otvet)


n = list(map(int, input().split()))
(n, m) = (n[0], n[1])
s = 'abcdefghijklmnopqrstuvwxyz'
s2 = ''
s3 = ''
for i in range(m):
	s2 += s[i]
g = 0
for i in range(n):
	if g == m:
		g = 0
	s3 += s2[g]
	g += 1
print(s3)


(n, k) = list(map(int, input().split()))
vse_bukvi = 'abcdefghijklmnopqrstuvwxyz'
budem_usati = vse_bukvi[0:k]
next_bukva = 0
password = []
for i in range(n):
	password.append(budem_usati[next_bukva])
	if next_bukva == k - 1:
		next_bukva = 0
	else:
		next_bukva += 1
print(''.join(password))


s = 'abcdefghijklmnopqrstuvwxyz'
(a, b) = input().split()
for i in range(0, int(b)):
	print(s[i], end='')
diff = int(a) - int(b)
j = 0
for i in range(0, diff, 1):
	print(s[j], end='')
	j += 1
	if j == int(b):
		j = 0


(n, k) = [int(x) for x in input().split(' ')]
symbols = 'abcdefghijklmnopqrstuvwxyz'
newPsw = ''
q = 0
for i in range(n):
	if q == k:
		q = 0
	newPsw += symbols[q]
	q += 1
print(newPsw)


alph = 'abcdefghijklmnopqrstuvwxyz'
import sys
(n, k) = [int(i) for i in sys.stdin.readlines()[0].split()]
password = ''
alph = alph[:k]
i = 0
while len(password) < n:
	password = password + alph[i]
	i = i + 1
	if i == k:
		i = 0
print(password)


(n, k) = map(int, input().split())
latin = 'abcdefghijklmnopqrstuvwxyz'
p = ''
for i in range(n):
	p += latin[i % k]
print(p)


import string
import random
il = list(map(int, input().split()))
n = il[0]
d = il[1]
alphal = list(string.ascii_lowercase)
a1 = alphal[0:d]
str1 = []
dL = []
for i in range(n):
	if i == 0:
		str1.append(a1[i])
		dL.append(a1[i])
	else:
		x = random.randint(0, d - 1)
		if len(dL) != d:
			while a1[x] == str1[i - 1] or a1[x] in dL:
				x = random.randint(0, d - 1)
			str1.append(a1[x])
			dL.append(a1[x])
		else:
			while a1[x] == str1[i - 1]:
				x = random.randint(0, d - 1)
			str1.append(a1[x])
print(''.join(str1))


import sys
fin = sys.stdin
fout = sys.stdout
(n, k) = map(int, fin.readline().split())
first = ''
for i in range(k):
	first += chr(97 + i)
ans = first
for i in range(n - k):
	ans += first[i % k]
fout.write(str(ans))


import sys
line = input()
(n, k) = (int(i) for i in line.split())
k -= 1
t = k
for i in range(int(n)):
	sys.stdout.write('%s' % chr(k + ord('a')))
	sys.stdout.flush()
	k -= 1
	if k == -1:
		k = t


alpha = 'abcdefghijklmnopqrstuvwxyz'
(n, m) = map(int, input().split())
s = ''
s += alpha[0:m]
i = 0
while len(s) < n:
	s += chr(ord('a') + i)
	i += 1
	if i == m:
		i = 0
print(s)


ls = [chr(i) for i in range(97, 123)]
(n, k) = input().strip().split(' ')
(n, k) = (int(n), int(k))
l = []
l1 = ls[0:min(k, 26)]
i = -1
while len(l) < n:
	i = (i + 1) % k
	l.append(l1[i])
print(''.join(l))


raw = list(map(int, input().split()))
n = raw[0]
k = raw[1]
string = ''
difference = n - k
for i in range(97, 97 + k):
	string += chr(i)
leng = len(string)
current = string
while difference > 0:
	string += current
	difference -= leng
while difference != 0:
	string = string[0:-1]
	difference += 1
print(string)


(n, m) = map(int, input().split())
a = ord('a')
alph = [chr(i) for i in range(a, a + 26)]
s = ''
for i in range(m):
	s = s + alph[i]
for i in range(n - m):
	s = s + s
	if len(s) > n + 2:
		break
s = s[0:n]
print(s)


import string
import random
n_cp = list(map(int, input().split()))
n = n_cp[0]
k = n_cp[1]
num_list = []
lower_upper_alphabet = string.ascii_letters
i = 0
count = 0
while i < n:
	if k > count:
		num_list.append(lower_upper_alphabet[count])
		count += 1
	else:
		num_list.append(lower_upper_alphabet[count - 2])
		count -= 1
	i += 1
print(''.join(num_list))


def main():
	(n, k) = map(int, input().split())
	chars = 'abcdefghijklmnopqrstuvwxyz'
	chars = chars[:k]
	password = ''
	for i in range(n):
		pos = i % k
		password += chars[pos]
	print(password)
main()


def I():
	return list(map(int, input().split()))
(n, k) = I()
s2 = ''.join([chr(i) for i in range(99, 99 + k - 2)])
s1 = 'ab' * ((n - k + 2) // 2)
if (n - k + 2) % 2 != 0:
	s1 += 'a'
print(s2 + s1)


(n, k) = map(int, input().split())
A = [0] * n
m = 97
for i in range(k):
	A[i] = chr(m)
	m += 1
j = k
while j < n:
	A[j] = A[j - k]
	j += 1
print(''.join(A))


def generateK(k):
	ascii_letters = []
	range_lower_case = list(range(97, 123))
	for i in range(k):
		if range_lower_case[i] not in ascii_letters:
			ascii_letters.append(chr(range_lower_case[i]))
	return ascii_letters

def generateN(n, ascii):
	n_password = ''
	for i in range(n):
		k = i % len(ascii)
		n_password += ascii[k]
	return n_password

def generate_new_password():
	(n, k) = [int(x) for x in input().split()]
	if n >= k:
		ascii_letters = generateK(k)
		password = generateN(n, ascii_letters)
		print(password)
generate_new_password()


import sys
(n, k) = input().split()
n = int(n)
k = int(k)
s = ''
x = k
for i in range(n):
	if k > 0:
		s = s + chr(97 + i)
		k -= 1
	else:
		for j in range(x):
			s = s + chr(97 + j)
			j += 1
			if len(s) == n:
				print(s)
				sys.exit()
print(s)


import string
import random
k = list(string.ascii_letters[0:26])
li = list()
n = list(map(int, input().split(' ')))
t = n[0] - n[1]
i = 0
while i < n[1]:
	c = random.choice(k)
	if c in li:
		continue
	else:
		li.append(c)
	i = i + 1
pass1 = ''.join(li)
i = 0
while i < t:
	pass1 = pass1 + pass1[i]
	i = i + 1
print(pass1)


import string
import random
input = list(map(int, input().strip().split()))
n = input[0]
k = input[1]
del input
new_password = ''
alphabet_string = string.ascii_lowercase
letters_list = list(alphabet_string)
random.shuffle(letters_list)
for i in range(k):
	new_password += letters_list.pop()
if len(new_password) <= n:
	new_password = (new_password * (n - k + 1))[0:n]
print(new_password)


(n, k) = map(int, input().split())
ptr = 97
check = 0
ans = ''
for _ in range(n):
	ans += chr(ptr)
	check += 1
	if check >= k:
		check = 0
		ptr = 97
	else:
		ptr += 1
print(ans)


(n, k) = map(int, input().split())
l = []
z = ''
if n == k:
	for i in range(n):
		l.append(chr(97 + i))
else:
	while n - len(l) > k:
		for i in range(k):
			l.append(chr(97 + i))
	for i in range(0, n - len(l)):
		l.append(chr(97 + i))
z = ''.join(map(str, l))
print(z)


alph = list('abcdefghijklmnopqrstuvwxyz')
(ln, sy) = map(int, input().split())
chars = alph[:sy]
pw = ''
for i in range(ln):
	pw += chars[i % len(chars)]
print(pw)


(n, k) = map(int, input().split())
pwd = ''
for x in range(97, 97 + k):
	pwd += chr(x)
for y in range(n - k):
	pwd += pwd[y]
print(pwd)


(n, k) = [int(x) for x in str(input()).split(' ')]
mas = 'qwertyuiopasdfghjklzxcvbnm'[:k]
ans = 'q'
t = 'w'
i = 1
j = 1
while len(ans) < n:
	while ans[j - 1] == t:
		i += 1
		if i >= k:
			i = 0
		t = mas[i]
	j += 1
	ans += t
print(ans)


inps = input().split()
n = int(inps[0])
k = int(inps[1])
password = ''
for i in range(k):
	password += chr(97 + i)
for i in range(n - k):
	password += password[i]
print(password)


(n, k) = [int(i) for i in input().split()]
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'
l = [i for i in l.split(' ')]
temp = []
f = ''
if k >= n:
	i = 0
	while n != 0:
		f += l[i]
		n -= 1
		i += 1
	print(f)
else:
	i = 0
	letters_left = n - k
	while k != 0:
		f += l[i]
		k -= 1
		temp.append(l[i])
		i += 1
	temp = ''.join(temp)
	temp *= letters_left
	i = 0
	while letters_left != 0:
		f += temp[i]
		letters_left -= 1
		i += 1
	print(f)


import sys
import math
input = sys.stdin.readline
(n, m) = map(int, input().split())
ans = ''
for i in range(min(n, m)):
	ans += chr(ord('a') + i)
for i in range(max(0, n - m)):
	ans += chr(ord('a') + i % m)
print(ans)


(n, k) = map(int, input().split())
a = 'qwertyuiopasdfghjklzxcvbnm'
ans = ''
while len(ans) < n:
	for i in a[:k]:
		if len(ans) != n:
			ans += i
print(ans)


(n, k) = [int(x) for x in input().split()]
word = 'abcdefghijklmnopqrstuvwxyz'
password = ''
for i in range(n):
	password = password + word[i % k]
print(password)


(q, w) = [int(x) for x in input().split()]
e = ''
i = 0
pis = 0
while pis < q:
	e += chr(ord('a') + i)
	i = i + 1
	pis = pis + 1
	if i >= w:
		i = 0
print(e)


import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def def_value():
	return []
(n, k) = invr()
temp = ''
for i in range(k):
	temp += chr(i + ord('a'))
mul = n // k + 1
res = temp * mul
print(res[:n])


(n, k) = map(int, input().split(' '))
result = ''
a = 97
z = 122
for i in range(a, a + k):
	result += chr(i)
for i in range(0, n - k):
	result += 'a' if i % 2 == 0 else 'b'
print(result)


import sys
import string
import random

def generate_password(n, k):
	characters = list(string.ascii_lowercase)
	random.shuffle(characters)
	characters = characters[:k]
	password = ''
	for i in range(n):
		if i == 0:
			choices = characters.copy()
		elif i < k:
			choices.remove(previous_character)
		else:
			choices = characters.copy()
			choices.remove(previous_character)
		char = random.choice(choices)
		password += char
		previous_character = char
	return password
args = [int(x) for x in sys.stdin.read().strip().split(' ')]
sys.stdout.write(generate_password(*args) + '\n')


(n, k) = map(int, input().split())
ch = []
for i in range(1, k + 1):
	ch.append(chr(i + 96))
if n <= k:
	print(''.join(ch))
else:
	res = ch
	br = 0
	while True:
		for i in range(n):
			res.append(ch[i])
			k += 1
			if k == n:
				br = 1
				break
		if br == 1:
			break
	print(''.join(res))


import sys
(a, b) = input().split()
m = int(a)
n = int(b)
d = ''
k = 'abcdefghijklmnopqrstuvwxyz'
j = m // n
g = m % n
if m > n and g != 0:
	b = k[0:n]
	for i in range(0, j):
		d = d + b
	d = d + b[0:g]
	print(d)
elif m > n and g == 0:
	b = k[0:n]
	for i in range(0, j):
		d = d + b
	print(d)
else:
	print(k[0:m])


from string import ascii_lowercase as letters
import random
(n, k) = [int(x) for x in input().split()]
password = ''
l = [str(x) for x in random.sample(letters, k)]
for i in l:
	password += i
i = 0
while len(password) < n:
	if i == k:
		i = 0
	password += password[i]
	i += 1
print(password)


(n, k) = input().split()
j = 0
res = ''
for i in range(int(n)):
	res += chr(97 + j)
	j = (j + 1) % int(k)
print(res)


(n, k) = map(int, input().split())
o = 0
for i in range(n):
	print(chr(o + 97), end='')
	o += 1
	if o == k:
		o = 0


alphabet = [0] * 26
for i in range(0, 26):
	alphabet[i] = chr(97 + i)
value = ''
(n, k) = map(int, input().split(' '))
j = -1
for i in range(n):
	if k == 0:
		if value[i - 1] == alphabet[j]:
			value += alphabet[j - 1]
		else:
			value += alphabet[j]
	else:
		k -= 1
		j += 1
		value += alphabet[j]
print(value)


(n, k) = map(int, input().split())
pas = ''
arr = ['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(0, n):
	pas += arr[i % k]
print(pas)


(x, y) = map(int, input().split())
password = []
s = ['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']
j = 0
if x % y == 0:
	z = int(x / y)
	for i in range(z):
		j = 0
		for k in range(y):
			password.append(s[j])
			j += 1
if x % y != 0:
	z = int(x / y)
	l = x - y * z
	for i in range(z):
		j = 0
		for k in range(y):
			password.append(s[j])
			j += 1
	j = 0
	for k in range(l):
		password.append(s[j])
		j += 1
res = ''
for i in password:
	res += i
print(res)


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
s1 = a[:k]
i = 0
for i in range(n - k):
	s1 += s1[i]
	i += 1
	if i == k:
		i = 0
print(s1)


from random import randint

def createPassword(n, k):
	password = []
	start = 97
	end = start + k
	symbols = [chr(i) for i in range(start, end)]
	for _ in range(int(n / k)):
		password.append(''.join(symbols))
	password.append(''.join(symbols[:n % k]))
	return ''.join(password)
(n, k) = map(int, input().split())
print(createPassword(n, k))


x = input().split(' ')
n = int(x[0])
k = int(x[1])
chars = 'abcdefghijklmnopqrstuvwxyz'
password = ''
counter = 0
for i in range(n):
	password += chars[counter]
	counter += 1
	if counter >= k:
		counter = 0
print(password)


(n, m) = map(int, input().split(' '))
s = ''
k = 0
h = n - m
for i in range(m):
	c = chr(ord('a') + k)
	s += c
	k += 1
for i in range(h):
	s += s[i]
print(s)


n = input().split()
m = int(n[1])
n = int(n[0])
sym = ['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']
tmp = []
pas = ''
k = 0
for i in range(0, m):
	tmp.append(sym[i])
for i in range(n):
	pas += tmp[k]
	if k != len(tmp) - 1:
		k += 1
	else:
		k = 0
print(pas)


alp = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
psw = ''
tmp = 0
for i in range(n):
	psw += alp[tmp]
	tmp += 1
	if tmp == k:
		tmp = 0
print(psw)


(n, k) = list(map(int, input().split()))
arr = []
for i in range(k):
	arr.append(chr(97 + i))
for j in range(n - k):
	arr.append(arr[j])
print(''.join(arr))


(n, k) = map(int, input().split())
s = ''
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n // k):
	s = s + a[0:k]
n = n % k
s = s + a[0:n]
print(s)


import sys
import random
args = sys.stdin.readline()
n = int(args.split(' ')[0])
k = int(args.split(' ')[1])
letters = []
p = []
plen = n
while len(letters) < k:
	char = chr(random.randint(97, 122))
	if char not in letters:
		letters.append(char)
while plen >= k:
	p.append(''.join(letters))
	plen -= k
p.append(''.join(letters[:plen - k]))
print(''.join(p))


(n, k) = map(int, input().split())
print(''.join(('abcdefghijklmnopqrstuvwxyz'[i % k] for i in range(n))))


(n, k) = [int(x) for x in input('').split()]
str = ''
pos = 0
while len(str) < n:
	if pos == k:
		pos = 0
	str += chr(97 + pos)
	pos += 1
print(str)


let = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
s = ''
dis = []
for i in range(k):
	dis.append(let[i])
for i in range(n):
	for j in range(k):
		if len(s) == n:
			break
		s += dis[j]
print(s)


import string
alphabet_string = string.ascii_lowercase
(n, k) = map(int, input().split())
password = ''
counter = 0
for x in range(n):
	if k > 0:
		password += alphabet_string[counter]
		counter += 1
		k -= 1
	else:
		password += password[-2]
print(password)


import string
res = string.ascii_lowercase[:26]
(n, r) = map(int, input().split())
s = res[:r]
for i in range(n - r):
	if len(s) != n:
		for j in range(1):
			s += s[j + i]
			break
	else:
		break
print(s)


(n, k) = map(int, input().split())
array = range(97, 97 + k)
_str = ''
for i in range(n):
	_str += chr(array[i % k])
print(_str)


import random
(n, k) = map(int, input().split())
word = []
while True:
	a = random.randint(97, 122)
	char = chr(a)
	if char not in word:
		word.append(char)
	if len(word) == k:
		break
f = ''.join(word)
while len(f) < n:
	f += f
d = f[:n]
print(d)


(n, k) = list(map(int, input().split()))
s = 'abcdefghijklmnopqrstuvwxyz'
m = min(k, 26)
z = n // m
ans = ''
for i in range(z):
	ans += s[:k]
ans += s[:n % m]
print(ans)


import string
(n, k) = map(int, input().split(' '))
ans = ''
for i in range(n):
	ans += string.ascii_lowercase[i % k]
print(ans)


from math import *
(n, k) = map(int, input().split())
check = []
for i in range(26):
	check.append(chr(i + 97))
ans = ''
count = 0
for i in range(n // k):
	for j in range(k):
		ans += check[j]
		print(check[j], end='')
		count += 1
for i in range(n % k):
	if ans[-1] != 'a':
		print(check[i], end='')
	else:
		print(check[i + 1], end='')


v = []
a = 0
m = 1
(x, y) = [int(z) for z in input().split()]
if 2 <= x <= 100 and 2 <= y <= min(x, 26):
	b = 97
	for z in range(x):
		if m <= y:
			n = chr(b)
			v.append(n)
			m += 1
		elif len(v) < x:
			v.append(v[a])
			a += 1
		b += 1
	for s in v:
		print(s, end='')


(n, k) = map(int, input().split())
ans = ''
for i in range(n):
	ans += chr(ord('a') + i % k)
print(ans)


import random

def new_pass(n, k):
	arr_org = ['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']
	arr_1 = []
	arr_2 = []
	arr_final = []
	num1 = random.randint(0, 12)
	num2 = num1
	if n < 2 or k < 2:
		print('Los parametros son 2<=n<=100 y 2<=k<=min(n,26)')
	elif n > 100 or k > 26:
		print(' Los parametros son 2<=n<=100 y 2<=k<=min(n,26)')
	else:
		for i in range(k):
			if i % 2 == 0:
				arr_1.append(arr_org[num1])
				num1 = num1 - 1
			else:
				num2 = num2 + 1
				arr_1.append(arr_org[num2])
		for j in range(k):
			arr_2.append(arr_1[j])
		y = j
		for x in range(n - k):
			letra = arr_1[random.randint(0, y)]
			while letra == arr_2[j]:
				letra = arr_1[random.randint(0, y)]
			arr_2.append(letra)
			j = j + 1
		arr_final = ''.join(arr_2)
	return arr_final
(aux1, aux2) = input().split(' ')
n = int(aux1)
k = min(int(aux2), 26)
print(new_pass(n, k))


inpt = input().split()
n = int(inpt[0])
k = int(inpt[1])
charset = 'abcdefghijklmnopqrstuvwxyz'
password = ''
index = 0
while len(password) != n:
	password += charset[index]
	index = (index + 1) % k
print(password)


(length, different) = map(int, input().split(' '))
import string
result = string.ascii_lowercase[:different]
left = length - different
from_string = result
current = 0
while left > 0:
	result += from_string[current]
	left -= 1
	if current == len(from_string) - 1:
		current = 0
	else:
		current += 1
print(result)


Alpha = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
N = n // k
R = n % k
Ans = ''
for i in range(N):
	Ans += Alpha[:k]
Ans += Alpha[:R]
print(Ans)


from string import ascii_lowercase
(n, k) = map(int, input().split())
answer = ''
for i in range(n):
	answer += ascii_lowercase[i % k]
print(answer)


al = 'abcdefghijklmnopqrstuvwxyz'
(size, distinct) = map(int, input().split())
ans = ''
i = 0
while size > 0:
	ans += al[i]
	i += 1
	if i == distinct:
		i = 0
	size -= 1
print(ans)


ls = list(map(int, input().split()))
n = ls[0]
k = ls[1]
a = ''
for c in range(97, 97 + k):
	a = a + chr(c)
for i in range(n - k):
	a = a + a[i]
print(a)


(n, k) = map(int, input().split())
charset = 'abpoiuytrewqlkjhgfdsmnvcxz'
pass_w = ''
index = 0
while len(pass_w) < n:
	pass_w += charset[index]
	index = (index + 1) % k
print(pass_w)


tmp = list(map(int, input().split()))
n = tmp[0]
k = tmp[1]
import random as rd
l = []
while True:
	l.append(rd.randint(ord('a'), ord('z')))
	if len(set(l)) == k:
		break
s = ''
l = list(set(l))
for i in range(n):
	s += chr(l[i % k])
print(s)


from random import randint as rand
(n, k) = map(int, input().split())
dis = set()
while len(dis) < k:
	dis.add(chr(rand(97, 122)))
dis = list(dis)
for i in range(n):
	print(dis[i % len(dis)], end='')


from string import ascii_lowercase
(n, k) = map(int, input().split())
print(ascii_lowercase[:k] * (n // k) + ascii_lowercase[:n % k])


(n, k) = map(int, input().split())
t = [chr(ord('a') + x) for x in range(k)]
res = ''
(f, p) = (0, 0)
for i in range(n):
	res += t[f]
	f = (f + 1) % k
print(res)


x = list(map(int, input().split()))
dist_lett = []
for i in range(x[1]):
	dist_lett.append(chr(97 + i))
for j in range(x[0] - x[1]):
	dist_lett.append(dist_lett[j])
print(''.join(map(str, dist_lett)))


(n, k) = map(int, input().split())
alphabet = list(map(chr, range(97, 123)))
ans = ''
i = 0
while len(ans) < n:
	ans += alphabet[i]
	if i + 1 == k or i == 26:
		i = 0
	else:
		i += 1
print(ans)


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


l = input().split()
n = int(l[0])
k = int(l[1])
letters = 'abcdefghijklmnopqrstuvwxyz'
password = ''
for i in range(n):
	password += letters[i % k]
print(password)


def main():
	(n, k) = map(int, input().split())
	symbols = ''.join((chr(x) for x in range(ord('a'), ord('a') + k)))
	full = n // k
	left = n - full * k
	print(symbols * full + symbols[:left])
main()


import string
import random
(n, k) = map(int, input().split(' '))
alphabetList = list(string.ascii_lowercase)
random.shuffle(alphabetList)
uniqueStr = ''.join(alphabetList)[:k]
password = uniqueStr * (n // k + n % k)
print(password[:n])


from string import ascii_lowercase
(n, k) = map(int, input().split())
a = ascii_lowercase[:k]
ret = list(a)
for i in range(k, n):
	for ch in a:
		if ch != ret[-1]:
			ret.append(ch)
			break
print(''.join(ret))


(n, k) = map(int, input().split())
bal = 'qwertyuiopasdfghjklzxcvbnm'
f = bal[:k] * 100
print(f[:n])


(passwordLength, distinctSymbols) = map(int, input().split())
alphabets = 'abcdefghijklmnopqrstuvwxyz'
characters = alphabets[:distinctSymbols]
password = ''
i = 0
for i in range(passwordLength):
	password += characters[i % distinctSymbols]
print(password)


from string import ascii_lowercase
(n, k) = map(int, input().split())
sym = []
for i in ascii_lowercase:
	sym.append(i)
ans = []
for i in range(k):
	ans.append(sym[i])
z = 0
for i in range(k, n):
	ans.append(ans[z])
	z += 1
	if z == k:
		z = 0
print(''.join(ans))


(n, k) = map(int, input().split())
letters = 'abcdefghijklmnopqrstuvwxyz'
password = ''
i = 0
while n > 0:
	password += letters[i]
	i += 1
	n -= 1
	if i == k:
		i = 0
print(password)


a = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
password = ''
a = a[:k] * (100 // k)
while len(a) < 100:
	os = 100 - len(a)
	a += a[:os]
print(a[:n])


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


(n, k) = map(int, input().split())
m = min(n, k)
s = ''
for i in range(m):
	s += chr(97 + i)
s += s * ((n - k) // k)
s += s[:n % k]
print(s)


import math
import os
import random
import re
from sys import stdin, stdout
from collections import Counter
from itertools import permutations

def si():
	return str(stdin.readline())

def ii():
	return int(stdin.readline())

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

def li():
	return list(mi())

def debug(x):
	return stdout.write(str(x))
(m, n) = mi()
for i in range(m):
	print(chr(97 + i % n), end='')


import string
inp = list(map(int, input().rstrip().split()))
s = string.ascii_lowercase
l = inp[0]
d = inp[1]
new_p = ''
avail = s[:d]
f = 1
while f:
	if len(new_p) < l:
		new_p += avail
	else:
		new_p = new_p[:l]
		f = 0
print(new_p)


from collections import Counter, defaultdict, deque
alph = 'abcdefghijklmnopqrstuvwxyz'
import math
import sys
input = sys.stdin.readline
(n, k) = [int(x) for x in input().split()]
s = alph[:k] * 100
print(s[:n])


y = [i for i in input().split()]
n = int(y[0])
k = int(y[1])
c = ord('b')
for i in range(1, n + 1):
	if i % k == 0:
		c = ord('a')
		print(chr(c), end='')
		c += 1
	else:
		print(chr(c), end='')
		c += 1
	if c == ord('z') + 1:
		c = ord('b')


import string
(n, k) = map(int, input().split())
alpha = list(string.ascii_lowercase)
ans = alpha[0:k] + alpha[0:2] * (n - k)
print(''.join(ans[0:n]))


(n, k) = [int(x) for x in input().split()]
kc = k
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet = list(alphabet)
password = ''
i = 0
while kc > 0:
	password += alphabet[i]
	kc -= 1
	i += 1
i = 0
while len(password) < n:
	if i == k:
		i = 0
	password += password[i]
	i += 1
print(password)


def password():
	inp = list(map(int, input().strip().split()))
	s = ''
	for i in range(inp[0]):
		s += chr(ord('a') + i % inp[1])
	return s
print(password())


def create_new_password(n, k):
	password = ''
	for i in range(k):
		password += chr(ord('a') + i)
	for i in range(n - k):
		password += password[i]
	return password
str_inp = input().split()
n = int(str_inp[0])
k = int(str_inp[1])
print(create_new_password(n, k))


def main():
	(n, k) = (int(inp) for inp in input().split())
	ascii_start_lowercase = 97
	password = ''.join([chr(97 + i % k) for i in range(n)])
	print(password)
	return password
main()


import string
(n, k) = map(int, input().split(' '))
var = string.ascii_lowercase[:k]
var *= n // k
x = n % k
var += var[:x]
print(var)


import string
(n, k) = (int(i) for i in input().split())
str = string.ascii_lowercase[:k]
ans = str * (n // k) + str[:n % k]
print(ans)


import sys
from statistics import mean
input = sys.stdin.readline

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())
(n, k) = invr()
res = ''
for j in range(97, 97 + k):
	res = res + chr(j)
if n >= k:
	x = int(n / k)
	y = int(n % k)
	for i in range(x):
		print(res, end='')
	li = list(res)
	for i in range(0, y):
		print(''.join(res[i]), end='')
else:
	li = list(res)
	for i in range(0, n):
		print(''.join(res[i]), end='')


(n, k) = input().split()
n = int(n)
k = int(k)
begin = ord('a')
s = ''
for i in range(n):
	s += chr(i % k + begin)
print(s)


(n, k) = list(map(int, input().split()))
s = 'abcdefghijklmnopqrstuvwxyz'
line = s[:k] * 50
print(line[:n])


(x, y) = map(int, input().split())
array = 'abcdefghijklomnpqrstuvwxyz'
pas1 = ''
index = 0
for i in range(0, x):
	if index == y:
		index = 0
	pas1 += array[index]
	index += 1
print(pas1)


import string
(n, k) = map(int, input().split())
alpha = list(string.ascii_lowercase)[0:k]
s = ''
cur_alpha = 0
for i in range(n):
	s += alpha[cur_alpha]
	cur_alpha = (cur_alpha + 1) % k
print(s)


import string
(a, b) = input().strip().split(' ')
(a, b) = [int(a), int(b)]
s = ''
q = 0
for j in range(a):
	if q == b:
		q = 0
	s = s + string.ascii_lowercase[q]
	q = q + 1
print(s)


m = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
z = m[:k]
z = z * (n // k)
print(z + z[:n - len(z)])


import random
tony = input()
tony = tony.split(' ')
n = int(tony[0])
k = int(tony[1])
alphabet = ['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']
password = []
for i in range(k):
	letter = random.choice(alphabet)
	alphabet.remove(letter)
	password.append(letter)
password = password * n
password = ''.join(password[0:n])
print(password)


import string
letters = string.ascii_lowercase
(n, k) = list(map(int, input().split(' ')))
for i in range(n):
	coordinate = i % k
	print(letters[coordinate], end='')
print()


import random
(n, k) = input().split()
n = int(n)
k = int(k)
random.seed()
alph = random.sample('abcdefghijklmnopqrstuvwxyz', min(n, k))
a = ''.join(alph)
ans = a * (n // k) + a[0:n % k]
print(ans)


(pass_len, unique_chars) = [int(i) for i in input().split()]
alpha_set = []
start = 'a'
for i in range(unique_chars):
	if i == 0:
		alpha_set.append(start)
	else:
		start = chr(ord(start) + 1)
		alpha_set.append(start)
curr_pos = 0
pass_output = ''
for i in range(pass_len):
	pass_output += alpha_set[i % unique_chars]
print(pass_output)


def main():
	(n, k) = map(int, input().split())
	base = [chr(i) for i in range(97, 123)]
	a = ''
	for i in range(n):
		for j in range(k):
			a += base[j]
			if len(a) == n:
				return a
print(main())


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
while n != 0:
	if n >= k:
		print(s[:k], end='')
		n -= k
	else:
		print(s[:n], end='')
		n = 0


import string
(n, k) = [int(s) for s in input().split(' ')]
x = (string.ascii_lowercase[:k] * (n // k + 1))[:n]
print(x)


(n, k) = [int(x) for x in input().split()]
arr = 'abcdefghijklmnopqrstuvwxyz'
password = ''
if n == k:
	password = arr[0:k]
	print(password)
elif n % k == 0:
	for i in range(n // k):
		password = password + arr[0:k]
	print(password)
else:
	for i in range(n // k):
		password = password + arr[0:k]
	print(password + arr[0:n % k])


ans = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
ans = ans[:k]
ans = ans * (n // k)
rem = n % k
ans += ans[0:rem]
print(ans)


import random
Inputs = input().split()
length_of_the_password = int(Inputs[0])
length_of_the_distinct_symbols = int(Inputs[1])
characters = list()
i = 97
while i <= 122:
	characters.append(chr(i))
	i += 1
password = list()
letter = 1
if length_of_the_password == length_of_the_distinct_symbols:
	while letter <= length_of_the_password:
		x = random.choice(characters)
		if x not in password:
			password.append(x)
		else:
			continue
		letter += 1
	new_password = ''
	for l in password:
		new_password += l
	print(new_password)
else:
	j = 1
	while j <= length_of_the_distinct_symbols:
		x = random.choice(characters)
		if x not in password:
			password.append(x)
		else:
			continue
		j += 1
	new_password = ''
	for l in password:
		new_password += l
	new_password = new_password * (length_of_the_password - length_of_the_distinct_symbols)
	if length_of_the_password - length_of_the_distinct_symbols == 1:
		new_password = new_password + new_password[0]
		print(new_password[:length_of_the_password])
	else:
		print(new_password[:length_of_the_password])


(n, k) = list(map(int, input().split(' ')))
alpha = 'abcdefghijklmnopqrstuvwxyz'
bucket = alpha[:k]
res = ''
while n - len(bucket) > 0:
	res += bucket
	n -= len(bucket)
res += bucket[:n]
print(res)


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
an = ''
i = 0
while len(an) < n:
	an += s[i % k]
	i += 1
print(an)


import string
alphabet = list(string.ascii_lowercase)
(n, k) = input().split()
n = int(n)
k = int(k)
possible_syms = alphabet[0:k]
final = ''
if n >= k:
	tmp_s = ''.join(possible_syms)
	final += tmp_s
	n -= k
while n >= k:
	final += tmp_s
	n -= k
possible_syms_last = possible_syms[0:n]
tmp_s = ''.join(possible_syms_last)
final += tmp_s
print(final)


(n, k) = list(map(int, input().split()))
s = ''
for i in range(k):
	s += chr(ord('a') + i)
m = n // k
res = s * m
res += s[:n % k]
print(res)


(n, k) = map(int, input().split())
s = ''
i = 0
while i < n:
	for j in range(97, 97 + k):
		if i >= n:
			break
		s += chr(j)
		i += 1
print(s)


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'[:k]
print(s * (n // k) + s[:n % k])


(n, k) = [int(x) for x in input().split(sep=' ')]
a_z = 'abcdefghijklmnopqrstuvwxyz'
passwd = ''
for i in range(0, n):
	passwd = passwd + a_z[i % k]
print(passwd)


(n, k) = map(int, input().split(' '))
st = ''
for i in range(97, 97 + k):
	st += chr(i)
x = 0
x = n - k
if x == 0:
	print(st)
if x > 0:
	for i in range(0, x):
		st += st[i]
	print(st)


import string
input_params = input().split(' ')
pass_length = int(input_params[0])
unique_symbols = int(input_params[1])
alphabet = string.ascii_lowercase
sub_str = alphabet[:unique_symbols]
division = divmod(pass_length, unique_symbols)
div = division[0]
mod = division[1]
result = ''
if div > 0:
	for i in range(div):
		result += sub_str
result += sub_str[:mod]
print(result)


from string import ascii_lowercase as alpha

def solve(n, k):
	dst_char = alpha[:k]
	str = ''
	l = 0
	while len(str) != n:
		str += dst_char[l]
		l += 1
		if l == k:
			l = 0
	return str
(n, k) = list(map(int, input().split()))
print(solve(n, k))


(n, k) = map(int, input().split())
s = ''
w = ''
q = 0
for i in range(97, 97 + k):
	s += chr(i)
for i in range(n):
	w += s[q]
	q += 1
	if q == k:
		q = 0
print(w)


import math

def ch(n, k, a):
	b = set()
	flag = False
	b.add(a[0])
	for i in range(1, len(a)):
		flag = a[i] == a[i - 1]
		b.add(a[i])
	if flag or len(a) != n or len(b) != k:
		print('NO' + str(n) + ' ' + str(k))
b = input().split()
n = int(b[0])
k = int(b[1])
a = set()
res = ''
for i in range(n):
	if len(a) < k:
		for j in range(ord('a'), ord('z') + 1):
			if not j in a:
				a.add(j)
				res = res + chr(j)
				break
	else:
		for j in a:
			if chr(j) != res[i - 1]:
				res = res + chr(j)
				break
print(res)


(n, k) = map(int, input().split())
s = 'qwertyuiopasdfghjklzxcvbnm'
print(s[:k] * (n // k) + s[:n % k])


import string
(n, k) = map(int, input().split())
letters = string.ascii_lowercase
password = ''
for i in range(k):
	password += letters[i]
i = 0
while len(password) < n:
	password += password[i]
	i += 1
print(password)


from string import ascii_lowercase
(n, k) = str(input()).split()
n = int(n)
k = int(k)
c = 0
if n < k:
	print(ascii_lowercase[0:n])
r = n % k
rep = n // k
s = ascii_lowercase[0:k]
us = rep * s
mus = us + ascii_lowercase[0:r]
print(mus)


(n, k) = input().split()
n = int(n)
k = int(k)
s = 'abcdefghijklmnopqrstuvwxyz'
substr = s[:k] * (n // k + 1)
print(substr[:n])


print((lambda n, k: ('abcdefghijklmnopqrstuvwxyz'[:k] * ((n + k - 1) // k))[:n])(*list(map(int, input().split()))))


(n, k) = map(int, input().split())
str = ''
c = 0
for i in range(n):
	str = str + chr(c + 97)
	c += 1
	if c == k:
		c = 0
print(str)


import sys
from math import ceil, log, gcd
RI = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('Yes')

def NO():
	print('No')
INF = 10 ** 18
MOD = 10 ** 9 + 7
(n, k) = RI()
ans = []
ite = 0
for i in range(n):
	ans.append(chr(ord('a') + ite))
	ite = (ite + 1) % k
print(''.join(ans))


(n, k) = map(int, input().split())
l = []
z = 0
for i in range(k):
	l.append(chr(i + 97))
for i in range(n):
	z = i // k
	print(l[i - z * k], end='')


(n, k) = map(int, input().split())
a = ''
count = 0
for i in range(n):
	a += chr(97 + count)
	count += 1
	if count == k:
		count = 0
print(a)


from random import randint
(n, k) = map(int, input().split())
dist = []
while k > 0:
	ch = chr(randint(97, 122))
	if ch not in dist:
		dist.append(ch)
		k -= 1
i = 1
s = dist[0]
while len(s) < n:
	if i < len(dist):
		if s[-1] == dist[i]:
			if i > 0:
				s += dist[i - 1]
			else:
				s += dist[i + 1]
		else:
			s += dist[i]
		i += 1
	else:
		i = 0
print(s)


__author__ = 'Ryabchun Vladimir'
(n, k) = map(int, input().split())
answer = ''
last = 96
used = []
while len(answer) != n:
	if last >= 96 + k:
		last = 97
	else:
		last += 1
	answer += chr(last)
print(answer)


(n, k) = [int(x) for x in input().split()]
s = 'abcdefghijklmnopqrstuvwxyz'
q_s = ''
r_s = ''
for i in range(0, k):
	q_s += s[i]
rem = n - n // k * k
for i in range(rem):
	r_s += s[i]
print(q_s * (n // k) + r_s)


from string import ascii_lowercase
(n, k) = map(int, input().split())
index = 0
for i in range(n):
	if index >= k:
		index = 0
	print(ascii_lowercase[index], end='')
	index += 1


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


(n, k) = map(int, input().split())
charecters = []
for i in range(k):
	a = chr(ord('a') + i)
	charecters.append(a)
n = n - k
i = 0
j = 0
s = ''
while i < n:
	s += charecters[j % k]
	j += 1
	i += 1
ans = ''
for i in charecters:
	ans += i
print(ans + s)


n = list(map(int, input().split()))
s = ''
z = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n[1]):
	s += z[i]
if len(s) != n[0]:
	w = n[0] - len(s)
	for i in range(w):
		s += s[i]
print(s)


import collections as col
import itertools as its
import sys
import operator
from copy import copy, deepcopy

class Solver:

	def __init__(self):
		pass

	def solve(self):
		(n, k) = map(int, input().split())
		s = ''
		for i in range(k):
			s += chr(ord('a') + i)
		now = 0
		while len(s) < n:
			s += chr(ord('a') + now)
			now = not now
		print(s)
s = Solver()
s.solve()


nk = input().split()
n = int(nk[0])
k = int(nk[1])
password = ''
i = 0
j = 0
for i in range(n):
	if j < k:
		password = password + chr(97 + j)
		j += 1
	else:
		j = 0
		password = password + chr(97 + j)
		j += 1
print(password)


lat = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
sd = lat[:k]
st = sd * (n // k + 1)
st = st[:-(len(st) - n)]
print(st)


(n, k) = [int(c) for c in input().split(' ')]
aCode = ord('a')
(passwordd, er) = ('', '')
for i in range(0, k):
	er += chr(aCode + i)
count = n // k
rest = n % k
passwordd = er * count
if rest > 0:
	passwordd += er[:rest]
print(passwordd)


(n, k) = map(int, input().split())
a = 'qwertyuiopasdfghjklzxcvbnm'
s = ''
for i in range(k):
	s += a[i]
n -= k
i = 0
while n:
	s += s[i]
	i += 1
	n -= 1
print(s)


[n, k] = [int(x) for x in input().split()]
s = ''
for i in range(n):
	s += chr(i % k + 97)
print(s)


(n, k) = map(int, input().split())
abc = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	print(abc[i % k], end='')
print()


import random
x = input()
x = x.split()
l = []
L = []
c = True
for i in range(int(x[0])):
	l.append(0)
for i in range(int(x[1]) - 1):
	if c:
		L.append(chr(random.randint(ord('a'), ord('z'))))
		c = False
	while not c:
		y = chr(random.randint(ord('a'), ord('z')))
		try:
			L.index(y)
		except:
			L.append(y)
			break
c = 0
for i in range(len(l)):
	while True:
		try:
			l[i] = L[c]
			c += 1
		except:
			c = 0
		else:
			break
l = ''.join(l)
print(l)


from random import randint
(n, k) = map(int, input().split())
(chars, str) = ([chr(i) for i in range(ord('a'), ord('z') + 1)], '')
(start, step, current) = (randint(0, 25), 2 * randint(0, 5) + 1, 0)
while len(str) < n:
	str += chars[(current * step + start) % 26]
	current = (current + 1) % k
print(str)


(n, k) = map(int, input().split())
a = []
for i in range(k):
	x = ord('a')
	a.append(chr(x + i))
if n > k:
	i = 0
	while len(a) < n:
		a.append(a[i])
		i += 1
		if i == len(a):
			i = 0
print(*a, sep='')


import string
a = string.ascii_lowercase
s = input().split(' ')
n = int(s[0])
k = int(s[1])
ans = ''
for i in range(n):
	ans += a[i % k]
print(ans)


(a, b) = list(map(int, input().split()))
s = 'abcdefghijklmnopqrstuvwxyz'
line = s[:b] * 50
print(line[:a])


import random

def generate_password(n, k):
	letters = []
	password = ''
	for _ in range(k):
		l = 96 + random.randint(1, 26)
		while l in letters:
			l = 96 + random.randint(1, 26)
		letters.append(l)
		password += chr(l)
	while len(password) < n:
		rand_letter = letters[random.randint(0, k - 1)]
		while password[-1] == chr(rand_letter):
			rand_letter = letters[random.randint(0, k - 1)]
		password += chr(rand_letter)
	return password
(n, k) = map(int, input().split())
print(generate_password(n, k))


def password(n, k):
	s = ''
	for i in range(n):
		s += chr(97 + i % k)
	return s
(N, K) = [int(j) for j in input().split()]
print(password(N, K))


(n, k) = map(int, input().split())
ans = ''
for i in range(k):
	ans = ans + chr(97 + i)
ans = ans + (n - k) // 2 * 'ab'
if (n - k) % 2:
	ans = ans + 'a'
print(ans)


(n, k) = map(int, input().split())
chars_dis = (n // k + 1) * [chr(i + 97) for i in range(k)]
print(''.join(chars_dis[:n]))


import string
import random

def findUniqueChar(password):
	rndChar = ''
	while rndChar in password:
		rndChar = random.choice(string.ascii_lowercase)
	return rndChar
[n, k] = input().split(' ')
k = int(k)
n = int(n)
password = ''
for char in range(n):
	if k > 0:
		password += findUniqueChar(password)
		k -= 1
	else:
		password += password[len(password) - 2]
print(password)


nk = input().strip().split(' ')
n = int(nk[0])
k = int(nk[1])
seed = ord('a')
vocab = ''.join([chr(i) for i in range(seed, seed + k)])
if n <= k:
	print(vocab[:n])
else:
	password = ''
	for i in range(n // k + 1):
		password += vocab
	print(password[:n])


import string
lower = string.ascii_lowercase
(n, k) = map(int, input().split())
s = ''
s += lower[:k]
toggle = 0
while len(s) != n:
	if toggle % 2 == 0:
		s += lower[0]
	else:
		s += lower[1]
	toggle += 1
print(s)


import string
import random
data = [int(x) for x in input().split()]
n = data[0]
k = data[1]
temp = []
password = []
for i in range(0, k):
	temp.append(random.choice([item for item in string.ascii_lowercase if item not in temp]))
for i in range(0, k - 1):
	if temp[i] == temp[i + 1] and temp[i + 1] != 'z':
		temp[i] = chr(ord(temp[i]) + 1)
	elif temp[i] == temp[i + 1] and temp[i + 1] == 'z':
		temp[i + 1] = 'a'
if n == k:
	print(''.join(temp))
else:
	for i in range(0, k):
		password.append(temp[i])
	for i in range(0, n - k):
		if i >= len(temp):
			i = i % len(temp)
		password.append(temp[i])
	print(''.join(password))


get = lambda : list(map(int, input().split()))
(n, k) = get()
ans = []
l = ''.join((chr(97 + i) for i in range(k)))
print(l * (n // k) + l[:n % k])


(n, k) = map(int, input().split())
for i in range(0, k):
	print(chr(ord('a') + i), end='')
print('ab' * ((n - k) // 2), end='')
if (n - k) % 2 == 1:
	print('a')


inp = input().split()
n = int(inp[0])
k = int(inp[1])
ans = ''
loopStr = ''
word = 97
for i in range(k):
	loopStr += chr(word)
	word += 1
for i in range(n):
	ans += loopStr
	if len(ans) > n:
		break
print(ans[0:n])


(n, k) = map(int, input().split(' '))
symbols = 'abcdefghijklmnopqrstuvwxyz'
newPsw = ''
q = 0
fx = lambda q: q + 1
for i in range(n):
	newPsw += symbols[q]
	q = 0 if q == k - 1 else fx(q)
print(newPsw)


(n, k) = map(int, input().split())
al = 'abcdefghijklmnopqrstuvwxyz'
s = ''
for j in range(k):
	s += al[j]
d = n - k
if d != 0:
	while d:
		for j in range(k):
			d = d - 1
			s += al[j]
			if d == 0:
				break
print(s)


(n, k) = map(int, input().split())
s = ''
for i in range(k):
	s += chr(97 + i)
x = n % k
ss = ''
if x == 0:
	x = 1
else:
	for i in range(x):
		ss += chr(97 + i)
y = n // k
print(s * y + ss)


(n, k) = [int(x) for x in input().split()]
i = 0
string = ''
for o in range(n):
	string = string + chr(ord('a') + i)
	i = i + 1
	if i == k:
		i = 0
print(string)


alpha = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = list(map(int, input().split()))
used_lit = alpha[:k]
password = used_lit * (n // k + 1)
print(password[:n])


(n, k) = map(int, input().split(' '))
d = list(map(chr, range(ord('a'), ord('z') + 1)))
pw = str()
for i in range(k):
	pw += d[i]
if k != n:
	for i in range(n):
		pw += pw[i % k]
print(pw[0:n])


(n, k) = map(int, input().split())
chars = []
j = 97
for i in range(k):
	chars.append(chr(j))
	j += 1
pwd = ''
for i in range(n):
	pwd += chars[i % k]
print(pwd)


(n, k) = [int(x) for x in input().split()]
ch = 97
pw = ''
for i in range(0, k):
	pw += chr(ch)
	ch += 1
print(n // k * pw + pw[:n % k])


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
p = s[0:k]
print(p * (n // k) + s[0:n % k])


(x, y) = list(map(int, input().split()))
a = ''
for i in range(y):
	a = a + chr(ord('a') + i)
while len(a) < x:
	a = a + a
print(a[:x])


import string
(n, k) = map(int, input().split())
password = string.ascii_lowercase[:k] * (n // k) + string.ascii_lowercase[:n % k]
print(password)


(n, k) = map(int, input().split())
s = ''
i = 0
while len(s) != n:
	s += chr(97 + i)
	i += 1
	if i == k:
		i = 0
print(s)


(l, d) = map(int, input().split())
res = ''
cnt = 1
while len(res) < l:
	res += chr(96 + cnt)
	if cnt == d:
		cnt = 1
	else:
		cnt += 1
print(res)


from sys import stdin
import string

def solution():
	(n, k) = [int(x) for x in stdin.readline().strip().split()]
	alpha = string.ascii_lowercase
	i = 0
	res = ''
	for j in range(0, n):
		res += alpha[i]
		i = (i + 1) % k
	return res
print(solution())


(n, k) = map(int, input().split())
a = []
for i in range(k):
	a.append(chr(97 + i))
res = ''
b = n // k
res += b * ''.join(a)
c = n % k
res += ''.join(a[0:c])
print(res)


(n, k) = map(int, input().split())
alphabets = 'abcdefghijklmnopqrstuvwxyz'
print(alphabets[:k] * (n // k) + alphabets[:n % k])


(password_len, no_of_distinct_char) = map(int, input().split())
alpha = 'abcdefghijklmnopqrstuvwxyz'
distinct = alpha[:no_of_distinct_char]
remaining = password_len % no_of_distinct_char
repeat = password_len // no_of_distinct_char
print(distinct * repeat + distinct[:remaining])


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


def solution(n, k):
	lowercase = [chr(97 + i) for i in range(26)]
	password = []
	for i in range(n):
		password.append(lowercase[i % k])
	return ''.join(password)
(n, k) = map(int, input().split())
print(solution(n, k))


(n, k) = map(int, input().split())
print(('abcdefghijklmnopqrstuvwxyz'[0:k] * 1000)[0:n])


import random
import sys
input = sys.stdin.readline

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())
(n, k) = invr()
letters = random.sample(range(97, 123), k)
password = []
for i in range(n):
	password.append(chr(letters[i % k]))
print(''.join(password))


(n, k) = map(int, input().split())
alpha = 'abcdefghijklmnopqrstuvwxyz'
pas = ''
i = 0
while len(pas) != k:
	pas = pas + alpha[i]
	i += 1
upper_bound = i
i = 0
while len(pas) != n:
	if i != upper_bound:
		pas = pas + alpha[i]
		i += 1
	else:
		i = 0
		pas = pas + alpha[i]
		i += 1
print(pas)


alphabet = [x for x in 'abcdefghijklmnopqrstuvwxyz']
(N, K) = [int(x) for x in input().split()]
newpass = ''
for i in range(N // K):
	newpass += ''.join(alphabet[:K])
if len(newpass) < N:
	newpass += ''.join(alphabet[:N - len(newpass)])
print(newpass)


from string import ascii_lowercase as letters
import random
(n, k) = [int(x) for x in input().split()]
password = ''
l = [str(x) for x in random.sample(letters, k)]
for i in l:
	password += i
for i in range(0, n - k):
	if password[i] is not password[i - 1] and password[i] is not password[i + 1]:
		password += password[i]
print(password)


(n, k) = map(int, input().split())
alphabet = 'qwertyuiopasdfghjklzxcvbnm'
symbol = alphabet[:k]
if n == k:
	print(symbol)
elif n > k:
	s = symbol * (n // k)
	if len(s) != n:
		s += symbol[:n - len(s)]
	print(s)
else:
	print(symbol[:n])


(n, k) = map(int, input().split())
c = 'abcdefghijklmnopqrstuvwxyz'
n = n - k
for i in range(k):
	print(c[i], end='')
for i in range(n):
	if i % 2 == 0:
		print('a', end='')
	else:
		print('b', end='')


(n, k) = map(int, input().split())
ALL = 'abcdefghijklmnopqrstuvwxyz'
if k == 26:
	ll = ALL[:]
else:
	ll = ALL[0:k]
po = ''
while n > 0:
	for i in ll:
		if n == 0:
			break
		else:
			po = po + i
			n -= 1
print(po)


from string import ascii_lowercase
x = ascii_lowercase
(n, a) = map(int, input().split())
x = x[:a]
ans = []
counter = 0
while n != 0:
	if counter == a - 1:
		ans.append(x[counter])
		counter = 0
		n -= 1
	else:
		ans.append(x[counter])
		counter += 1
		n -= 1
print(''.join(ans))


(n, k) = (int(x) for x in input().split(' '))
password = []
characters = [chr(x) for x in range(97, 97 + k)]
j = 0
for i in range(0, n):
	if j >= k:
		j = 0
	password.append(characters[j])
	j += 1
print(''.join(password))


(n, k) = map(int, input().split())
c = [chr(x) for x in range(ord('a'), ord('a') + k)]
s = ''
for i in range(n):
	s += c[i % k]
print(s)


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
x = n // k
y = n % k
r = s[:k] * x
r = r + s[:y]
print(r)


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
s = ''
c = 0
s += a[0:k] * (n // k)
s += a[0:n % k]
print(s)


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


import random
my_string = 'abcdefghijklmnopqrstuvwxyz'
inline = [int(x) for x in input().split()]
n = inline[0]
k = inline[1]
password = ''
prevLetter = ''
letter = ''
kset = []
index = random.randint(0, 25)
for i in range(n):
	if len(set(password)) < k:
		while letter == prevLetter or index in kset:
			index = random.randint(0, 25)
			letter = my_string[index]
		kset.append(index)
		password += letter
		prevLetter = letter
	else:
		while letter == prevLetter:
			index = random.randint(0, len(password) - 1)
			letter = password[index]
		password += letter
		prevLetter = letter
print(password)


from string import ascii_lowercase
(n, k) = map(int, input().split())
letters = list(ascii_lowercase)
pas = []
for i in range(n):
	pas.append(letters[i % k])
print(''.join(pas))


(n, k) = map(int, input().split(' '))
a = [chr(x) for x in range(ord('a'), ord('z') + 1)]
print(*a[:k] * (n // k) + a[:n % k], sep='')


import random
(n, k) = map(int, input().split())
q = 97
a = [0] * 26
count = 0
y = 1000000000000000
for i in range(26):
	a[i] = q
	q += 1
random.shuffle(a)
for i in range(26):
	a[i] = chr(a[i])
while count != n:
	for i in range(k):
		print(a[i], end='')
		count += 1
		if count == n:
			break


letters = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = list(map(int, input().split()))
output = ''
current = 0
for i in range(n):
	if current == k:
		current = 0
	output += letters[current]
	current += 1
print(output)


import sys
(n, k) = map(int, sys.stdin.readline().split())
s = 'abcdefghijklmnopqrstuvwxyz'
res = [s[i % k] for i in range(n)]
print(''.join(res))


st = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
st = st[:k]
if n <= k:
	print(st[:n])
elif n % k == 0:
	print(st * (n // k))
else:
	print(st * (n // k) + st[:n % k])


(n, k) = map(int, input().split())
s = 'abcdefghijklmnopqrstuvwxyz'
times = int(n / k)
print(s[:k] * times, s[:n % k], sep='')


nk = input().split()
n = int(nk[0])
k = int(nk[1])
L = [chr(97 + i) for i in range(26)]
t = ''
for i in range(0, k):
	t += L[i]
m = n // k
r = n % k
s = t * m + t[0:r]
print(s)


import random
(n, k) = input().split()
(n, k) = (int(n), int(k))
st = ''
i = 0
while len(st) < n:
	value = chr(random.randint(97, 122))
	if k >= 1:
		if not value in st:
			st += value
			k -= 1
	if k < 1:
		if not value == st[len(st) - 1]:
			if value in st:
				if st.isalpha():
					st += value
print(st)


from itertools import cycle
import string

def Anton(ls):
	(n, k) = ls
	name = string.ascii_lowercase[:k]
	gen = cycle(name)
	res = [next(gen) for _ in range(n)]
	return ''.join(res)
print(Anton(list(map(int, input().split()))))


import math
import sys

def ri():
	return input()

def ii():
	return int(input())

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

def mi():
	return list(map(int, input().split()))
(n, k) = mi()
r = n - k
ans = ''
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(k):
	ans += a[i % 26]
for i in range(r):
	ans += a[i % k]
print(ans)


import string
chars = list(string.ascii_lowercase)
inputlist = input().split(' ')
n = int(inputlist[0])
k = int(inputlist[1])
availablechars = chars[:k]
result = ''.join(availablechars)
for i in range(k, n):
	without_element = list(availablechars)
	without_element.remove(result[-1])
	result += without_element[0]
print(result)


(n, k) = map(int, input().split())
a = 0
for _ in range(n):
	print(chr(a + 97), end='')
	a += 1
	if a == k:
		a = 0


a = input().split()
n = int(a[0])
k = int(a[1])
alf = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm']
Nal = []
str = ''
for i in range(k):
	Nal.append(alf[i])
for i in range(n):
	j = i % k
	str += Nal[j]
print(str)


(n, k) = map(int, input().split(' '))
print(('qazwsxedcrfvtgbyhnujmikolp'[:k] * n)[:n])


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
password = ''
for i in range(k):
	password = password + a[i]
b = n - len(password)
c = ''
c = c + password * b
for i in range(b):
	password = password + c[i]
print(password)


import string
from math import ceil
(n, k) = list(map(int, input().split(' ')))
letters = list(string.ascii_lowercase)
arr = letters[:k] * ceil(n / k)
password = [0] * n
for i in range(n):
	password[i] = arr[i]
print(''.join(password))


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


result = ''
alph = [alph for alph in 'abcdefghijklmnopqrstuvwxyz']
s = input()
inp = s.split(' ')
nk = [int(i) for i in inp]
for i in range(0, nk[1]):
	result = result + alph[i]
i = 0
while len(result) != nk[0]:
	if i <= nk[1] - 1:
		result = result + alph[i]
		i = i + 1
	else:
		i = 0
print(result)


(n, k) = map(int, input().split())
a = list(map(chr, range(97, 97 + k)))
i = 0
j = 0
b = []
while i < n:
	b.append(a[j])
	if j == len(a) - 1:
		j = 0
	else:
		j += 1
	i += 1
for i in b:
	print(i, end='')


import random
import math
(n, k) = map(int, input().split())
if k > 26:
	k = 26
letters = 'abcdefghijklmnopqrstuvwxyz'
res = []
for i in range(n):
	res.append(letters[i % k])
print(''.join(res))


(n, k) = [int(x) for x in input().split()]
r = n // k
password = ''
for _ in range(r):
	for i in range(k):
		password += str(chr(ord('a') + i))
r = n % k
for i in range(r):
	password += str(chr(ord('a') + i))
print(password)


(n, k) = map(int, input().split())
stroka = 'qwertyuiopasdfghjklzxcvbnm'
answer = ''
while len(answer) < n:
	answer += stroka[0:k]
ans = answer[:n]
print(ans)


alph = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
diff = n - k
(mult, rem) = (diff // 2, diff % 2)
print(alph[0:k] + mult * alph[0:2] + rem * alph[0])


(n, m) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
s = ''
for i in range(2, m):
	s += a[i]
n -= m - 2
if n % 2 == 0:
	s += 'ab' * int(n / 2)
else:
	s += 'ab' * int(n / 2) + 'a'
print(s)


import random
n = list(map(int, input().split()))
x = []
x = random.sample(range(97, 123), n[1])
l = n[0] - n[1]
if l == 0:
	for i in range(n[0]):
		print(chr(x[i]), end='')
else:
	l1 = n[0] // n[1]
	l2 = n[0] % n[1]
	for i in range(l1):
		for j in range(n[1]):
			print(chr(x[j]), end='')
	if l2 != 0:
		for i in range(l2):
			print(chr(x[i]), end='')


(n, k) = list(map(int, input().split()))
s = ''
for i in range(n):
	s += chr(i % k + 97)
print(s)


(n, k) = map(int, input().split())
s = ''
x = n // k
y = n % k
for i in range(x):
	for j in range(k):
		p = str(chr(97 + j))
		s = s + p
for i in range(y):
	p = str(chr(97 + i))
	s = s + p
print(s)


import string
(n, k) = map(int, input().split())
ans = ''
ans += string.ascii_lowercase[:k] * (n // k)
n = n - n // k * k
ans += string.ascii_lowercase[:n]
print(ans)


l = 'abcdefghijklmnopqrstuvwxyz'
l = list(l)
ans = []
(n, k) = map(int, input().split())
for i in range(k):
	ans.append(l[i])
k = n - k
for i in range(2, k + 2):
	ans.insert(2 * i, l[i % 2])
print(''.join(ans))


import string
(n, k) = map(int, str(input()).split(' '))
new_pass = ''.join([string.ascii_lowercase[i] for i in range(k)])
length = n - len(new_pass)
if new_pass[-1] != 'a':
	if length % 2 == 0:
		new_pass += length // 2 * 'ab'
	else:
		new_pass += (length - 1) // 2 * 'ab' + 'a'
elif length % 2 == 0:
	new_pass += length // 2 * 'ba'
else:
	new_pass += (length - 1) // 2 * 'ba' + 'b'
print(new_pass)


from string import ascii_lowercase
import random
(n, k) = list(map(int, input().split()))
password = []
while len(password) != k:
	x = random.choice(ascii_lowercase)
	if x not in password:
		password.append(x)
password = ''.join(password)
while len(password) < n:
	password += password
print(password[:n])


from random import randint

def generate_password(n, k):
	chars = []
	password = ''
	characters = ['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']
	while True:
		value = randint(0, 25)
		if not chars.__contains__(characters[value]):
			chars.append(characters[value])
		if len(chars) == k:
			break
	i = 0
	for char in range(n):
		i = char % len(chars)
		password += chars[i]
	return password
(n, k) = input().split()
print(generate_password(int(n), int(k)))


(n, k) = map(int, input().split())
l = 'abcdefghijklmnopqrstuvwxyz'
a = 0
for i in range(n):
	print(l[a], end='')
	a += 1
	if a == k:
		a = 0


(n, k) = map(int, input().split())
c = 'a'
l = list(map(chr, range(ord('a'), ord('a') + k)))
l = [x for x in l * (n // k)]
while len(l) < n:
	l.append(c)
	c = chr(ord(c) + 1)
print(''.join(l))


s = input().split(' ')
s[0] = int(s[0])
s[1] = int(s[1])
l = []
char = 97
while s[1]:
	l.append(char)
	char += 1
	s[1] -= 1
j = 0
for i in range(s[0]):
	if j == len(l):
		j = 0
	print(chr(l[j]), end='')
	j += 1
print()


n1 = input().split(' ')
n = int(n1[0])
k = int(n1[1])
alp = 'abcdefghijklmnopqrstuvwxyz'
s = ''
s1 = ''
s2 = ''
for i in range(k):
	s += alp[i]
s2 = s * (n - k)
for i in range(n - k):
	s1 += s2[i]
print(s + s1)


(a, b) = map(int, input().split())
l = 'abcdefghijklmnopqrstuvwxyz'
l1 = ''
for i in range(b):
	l1 += l[i]
for i in range(a):
	if i + 1 > b:
		i %= b
	print(l1[i], end='')


def password(n, k):
	cur = 97
	ans = ''
	while len(ans) != k:
		ans += chr(cur)
		cur += 1
		if cur == 123:
			cur = 97
	while len(ans) < n:
		ans += ans
	return ans[:n]
(n, k) = list(map(int, input().split()))
print(password(n, k))


inn = list(map(int, input().split(' ')))
lent = inn[0]
dist = inn[1]
lets = []
i = 97
for _ in range(dist):
	lets.append(chr(i))
	i += 1
passcd = ''.join(lets)
while len(passcd) < lent:
	passcd += passcd
print(passcd[:lent])


import sys
(n, k) = map(int, input().split())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
res = alphabet[0:min(n, k)]
cnt = n - k
pos = 0
while cnt > 0:
	res += alphabet[pos]
	if pos < k - 1:
		pos += 1
	else:
		pos = 0
	cnt -= 1
print(res)


(n, k) = map(int, input().split())
password = ''
j = 0
for i in range(n):
	password += chr(j + 97)
	j = (j + 1) % k
print(password)


alpha = 'qwertyuiopasdfghjklzxcvbnm'
i = 0
(n, k) = map(int, input().split())
j = 0
while n:
	print(alpha[j % k], end='')
	j += 1
	n -= 1


(n, k) = [int(i) for i in input().split()]
s = []
a = []
for i in range(ord('a'), ord('a') + k):
	s += [chr(i)]
x = n // k + 1
for i in range(x):
	a += s
print(*a[0:n], sep='')


(n, k) = input().split()
(j, z, result, arr) = (0, int(k), '', 'abcdefghijklmnoprstuzwvqxy')
for i in range(int(n)):
	result += arr[j]
	j = (j + 1) % z
print(result)


(n, k) = map(int, input().split())
alpha = 'abcdefghijklmnopqrtsuvwxyz'
alph_set = alpha[:k]
res = ''
for i in range(n):
	res = res + alph_set[i % k]
print(res)


import string
alphabet_string = string.ascii_lowercase
(n, k) = list(map(int, input().split(' ')))
ans = alphabet_string[:k]
print(ans * (n // k) + alphabet_string[:n % k])


(n, k) = map(int, input().split())
l = [chr(i + 97) for i in range(k)]
z = n // k * k
a = n // k
z1 = n - z
ans = l * a + l[0:z1]
print(''.join(ans))


(n, k) = map(int, input().split())
alpha = 'abcdefghijklmnopqrstuvwxyz'
repeat = (n - k) // k + 1
part = (n - k) % k
word = alpha[:k]
print(word * repeat + word[:part])


x = ['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) = list(map(int, input().split()))
while n > 0:
	for i in range(0, k):
		print(x[i], end='')
		n -= 1
		if n == 0:
			break
		else:
			continue


lst = []
(n, k) = list(map(int, input().split()))
i = 0
j = 0
while i < n:
	lst.append(chr(97 + j))
	limit = k - 1
	if j == limit:
		j = 0
	elif i == n:
		break
	else:
		j += 1
	i += 1
print(''.join(lst))


def main():
	from random import choice
	(n, k) = input().split()
	n = int(n)
	k = int(k)
	abjad = 'abcdefghijklmnopqrstuvwxyz'
	string = ''
	j = 0
	data = []
	while len(data) < k:
		j = choice(abjad)
		if j not in data:
			string += j
			data.append(j)
	if len(data) == n:
		print(string)
	else:
		j = 0
		while len(string) < n:
			if j < len(data):
				string += data[j]
				j += 1
			else:
				j = 0
		print(string)
main()


import string
(n, k) = (int(x) for x in input().split())
symbols = string.ascii_lowercase[0:k]
pwd = [symbols[i % len(symbols)] for i in range(n)]
print(*pwd, sep='')


(n, k) = map(int, input().split(' '))
alfa = 'abcdefghijklmnopqrstuvwxyz'
alphabet = []
for i in alfa:
	alphabet.append(i)
password = []
for i in range(k):
	password.append(alphabet[i])
for i in range(n - k):
	password.append(password[i])
for i in password:
	print(i, end='')


letters = [chr(i) for i in range(ord('a'), ord('z') + 1)]
(n, k) = map(int, input().split())
ans = ''
i = 0
while n > 0:
	j = 0
	while j < k and n > 0:
		ans += letters[j]
		j += 1
		n -= 1
print(ans)


x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
s = ''
c = ord('a')
for i in range(a):
	if c - ord('a') < b:
		s += chr(c)
	else:
		c = ord('a')
		s += chr(c)
	c += 1
print(s)


(n, k) = map(int, input().split())
l = []
for i in range(97, 97 + k):
	l.append(chr(i))
if n == k:
	print(''.join(l))
else:
	g = ''
	for j in range(n):
		g += l[j % k]
	print(g)


import random
(n, k) = map(int, input().split(' '))
str = ['abcdefghijklmnopqrstuvwxyz']
a = random.sample(str[0], k)
x = n // k
y = n % k
b = a.copy()
for i in range(x - 1):
	a.extend(b)
for i in range(y):
	a.append(a[i])
a = ''.join(a)
print(a)


import string

def main():
	(n, k) = [int(x) for x in input().split()]
	print((string.ascii_lowercase[:k] * 100)[:n])
main()


from math import ceil
(n, k) = input().split()
n = int(n)
k = int(k)
l = [chr(x) for x in range(ord('a'), ord('z') + 1)]
s = ''
S = ''
for i in range(k):
	s += l[i]
length = ceil(n / k)
for _ in range(length):
	S += s
print(S[:n])


(n, k) = map(int, input().split())
letters = ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm']
print(''.join(letters[:k]) * (n // k) + ''.join(letters[:n % k]))


def generate_password(n, k):
	alph = [chr(x) for x in range(ord('a'), ord('a') + k, 1)]
	password = ''
	j = 0
	for i in range(n):
		if j == len(alph):
			j = 0
		password += alph[j]
		j += 1
	return password
(n, k) = input().split()
n = int(n)
k = int(k)
pas = generate_password(n, k)
print(pas)


(n, k) = (int(x) for x in input().split())
import string
import random
word = []
word_ = word[:]
available = string.ascii_lowercase
while len(word) < n or len(word_) < k:
	x = random.choice(available)
	if len(word) > 1 and x == word[-1]:
		continue
	else:
		word.append(x)
		word_.append(x)
		if word.count(x) > 1:
			word_.remove(x)
		if len(word_) > k or n - len(word) < k - len(word_):
			word.pop()
		if len(word) < n and len(word_) == k:
			available = word_
print(''.join(word))


(n, k) = map(int, input().split())
temp = 'abcdefghijklmnopqrstuvwxyz'
fir = temp[:k]
s = fir
while len(s) < n:
	s += fir
s = s[:n]
print(s)


import math
(a, b) = [int(i) for i in input().split()]
f = 'abcdefghijklmnopqrstuvwxyz'
s = f[0:b]
d = math.floor(a / b)
s = s * d
e = abs(len(s) - a)
s = s + f[0:e]
print(s)


(n, k) = map(int, input().split())
alpha = 'abcdefghijklmnopqrstuvwxyz'
pas = []
for i in range(k):
	pas.append(alpha[i % 26])
for i in range(n - k):
	if i > k:
		pas.append(pas[i % k])
	else:
		pas.append(pas[i])
print(''.join(pas))


def new_password(length, distinct):
	(initial_number, string) = (97, 'a')
	for i in range(length - 1):
		if len(set(string)) < distinct:
			initial_number += 1
		elif initial_number > 97:
			initial_number -= 1
		else:
			initial_number += 1
		string += chr(initial_number)
	print(string)
(n, k) = map(int, input().split())
new_password(n, k)


import random

def generatePass(conditions):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	alphabetList = list(alphabet)
	passLetters = []
	password = ''
	index = 0
	for i in range(int(conditions[1])):
		randomIndex = random.randint(0, len(alphabetList) - 1)
		passLetters.append(alphabetList[randomIndex])
		alphabetList.pop(randomIndex)
	for i in range(int(conditions[0])):
		if index == len(passLetters):
			index = 0
		password += str(passLetters[index])
		index += 1
	return password
listOfInputs = input().split()
print(generatePass(listOfInputs))


(n, k) = input().split()
n = int(n)
k = int(k)
s = 'abcdefghijklmnopqrstuvwxyz'
res = s[:k] * (n // k + 1)
print(res[:n])


(password_length, distinct_chars) = input().split(' ')
password_length = int(password_length)
distinct_chars = int(distinct_chars)
latin_letters = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
if distinct_chars == password_length:
	print(latin_letters[:password_length])
else:
	ans += latin_letters[:distinct_chars]
	for i in range(distinct_chars, password_length):
		new_char = list(ans.replace(ans[-1], ''))[0]
		ans += new_char
	print(ans)


(N, K) = map(int, input().split())
for i in range(N):
	print(chr(ord('a') + i % K), end='')
print()


(n, k) = map(int, input().split())
for i in range(n):
	if i < k:
		print(chr(ord('a') + i), end='')
	else:
		print(chr(ord('a') + (i - k) % 2), end='')


from random import *
x = input()
arr = x.split(' ')
pw = ''
allowed = []
x = 97
for i in range(int(arr[1])):
	allowed.append(chr(x))
	x += 1
j = len(allowed)
while int(arr[0]) != 0:
	arr[0] = int(arr[0]) - 1
	j -= 1
	pw += allowed[j]
	if j == 0:
		j = len(allowed)
print(pw)


(n, k) = list(map(int, input().split()))
k = [chr(i) for i in range(ord('a'), ord('a') + k)]
p = ''
c = 0
for i in range(n):
	if c == len(k):
		c = 0
	p += k[c]
	c += 1
print(p)


import string
(n, k) = map(int, input().split())
s = string.ascii_lowercase[:k]
a = n // k
s = s + s * a
print(s[:n])


import random
(x, y) = input().split(' ')
password = ''
i = int(y)
X = 0
while len(password) != int(x):
	r = random.randrange(97, 123)
	if i != 0:
		if password == '':
			password += chr(r)
			i -= 1
		elif chr(r) in password:
			continue
		else:
			password += chr(r)
			i -= 1
	else:
		password += password[X]
		X += 1
print(password[:int(x)])


(n, k) = input().split()
n = int(n)
k = int(k)
l = []
i = 0
flag = 0
while True:
	for j in range(1, k + 1):
		l.append(chr(j + 96))
		i += 1
		if i == n:
			flag = 0
			break
		else:
			flag = 1
	if flag == 0:
		break
print(''.join(l))


(n, k) = map(int, input().split())
base = 'qwertyuiopasdfghjklzxcvbnm'[:k]
password = base * (n // k) + base[:n % k]
print(password)


import string

def solve():
	(n, k) = map(int, input().split())
	chrs = string.ascii_letters
	print(n // k * chrs[:k] + chrs[:n % k])
solve()


t = input().split()
n = int(t[0])
k = int(t[1])
string = 'ab'
k1 = 2
num = 67
i = 0
while k1 != k:
	string += chr(num).lower()
	num += 1
	k1 += 1
while len(string) != n:
	string += string[i]
	i += 1
print(string)


w = input().split()
(n, k) = (int(w[0]), int(w[1]))
s = ''
for i in range(n):
	s += chr(ord('a') + i % k % 26)
print(s)


inp = input().split()
n = int(inp[0])
k = int(inp[1])
arr = []
ch = 'a'
for i in range(k):
	arr.append(ch)
	ch = chr(ord(ch) + 1)
s = ''
j = 0
for i in range(n):
	if j >= k:
		j = 0
	s = s + str(arr[j])
	j = j + 1
print(s)


import string
(n, k) = [int(x) for x in input().split()]
alphabet = string.ascii_lowercase
symbol = alphabet[:k]
if n == k:
	print(symbol)
elif n > k:
	s = symbol * (n // k)
	if len(s) != n:
		s += symbol[:n - len(s)]
	print(s)
else:
	s = symbol[:n]
	print(s)


d = [chr(i) for i in range(97, 123)]
(n, k) = map(int, input().split())
s = ''.join(map(str, d[:k]))
s = s * (n // k) + s[:n % k]
print(s)


lst = list(map(int, input().strip().split()))[:2]
n = lst[0]
k = lst[1]
unqstr = ''
for i in range(k):
	unqstr = unqstr + chr(97 + i)
n = n - k
password = unqstr
k = 0
for j in range(n):
	password = password + unqstr[k]
	k += 1
	if k == len(unqstr):
		k = 0
print(password)


(n, k) = list(map(int, input().split()))
result = ''
p = []
for i in range(97, 123):
	p.append(chr(i))
c = p[:k + 1]
j = 0
for i in range(n):
	result += p[j % k]
	j += 1
print(result)


import string
(n, k) = map(int, input().split())
alfabeto = string.ascii_lowercase
letras = [l for (i, l) in enumerate(alfabeto) if i < k]
ans = ''
for i in range(n):
	ans += letras[i % k]
print(ans)


(n, k) = map(int, input().split())
s = 'qwertyuiopasdfghjklzxcvbnm'
s = s[:k]
ans = ''
for i in range(n):
	ans += s[i % len(s)]
print(ans)


string = input()
n = int(string.split(' ')[0])
k = int(string.split(' ')[1])
res = ''
possible = []
first_letter = 'a'
for i in range(k):
	possible.append(first_letter)
	first_letter = chr(ord(first_letter) + 1)
for i in range(n):
	res = res + str(possible[i % len(possible)])
print(res)


def NewPassword():
	(n, k) = map(int, input().strip().split())
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	new_pass = ''
	for i in range(k):
		new_pass += alpha[i]
	i = 0
	j = k
	while n - j > 0:
		new_pass += alpha[i]
		i += 1
		j += 1
		if i >= k:
			i = 0
	return new_pass
a = NewPassword()
print(a)


def pas(l, d):
	ls = [chr(i) for i in range(97, 123)]
	s = ''.join(ls[0:d])
	s = s * (l // d + 1)
	s = s[0:l]
	print(s)
(l, d) = list(map(int, input().split()))
pas(l, d)


(n, k) = input().split()
n = int(n)
k = int(k)
lis = ['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']
password = ['0'] * n
dist = []
for i in range(k):
	dist.append(lis[i])
j = 0
for i in range(n):
	password.insert(i, dist[j])
	j += 1
	if j == len(dist):
		j = 0
for i in range(n):
	print(password[i], end='')


(n, k) = map(int, input().split())
n -= k
ans = [chr(i + 97) for i in range(k)]
for i in range(n):
	ans += chr(k - 2 + 97 + int(i % 2 == 1))
for i in ans:
	print(i, end='')


import string
(n, k) = map(int, input().split())
lst = string.ascii_lowercase
if k >= 2:
	ans = str(lst[0] + lst[1]) * ((n - (k - 2)) // 2) + str(lst[0]) * ((n - (k - 2)) % 2) + str(lst[2:k])
else:
	ans = 'a' * n
print(ans)


from random import randint

def password_generator(n, k):
	password = ''
	list_char = []
	for i in range(97, 123):
		list_char.append(chr(i))
	for i in range(k):
		temp = list_char.pop(randint(0, len(list_char) - 1))
		password = password + temp
	if n > k:
		for i in range(n - k):
			password = password + password[i]
	print(password)
(n, k) = map(int, input().split())
password_generator(n, k)


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	(n, m) = LI()
	s = 'abcdefghijklmnopqrstuvwxyz'
	x = s[:m]
	ans = x * 101
	return ans[:n]
print(main())


(n, k) = map(int, input().split())
char_list = list()
for i in range(k):
	char_list.append(chr(97 + i))
password = ''
flag = 1
while True:
	for j in range(k):
		password += char_list[j]
	if len(password) > n:
		password = password[:n]
		break
print(password)


(n, k) = [int(i) for i in input().split()]
c = 97
password = ''
for i in range(k):
	password += chr(c)
	c += 1
for i in range(k, n):
	password += 'a' if i % 2 == 0 else 'b'
print(password)


from random import shuffle

def pswrd(n, k):
	if n >= 2 and n <= 100 and (k >= 2) and (k <= min(n, 26)):
		alphab = [chr(i) for i in range(97, 123)]
		shuffle(alphab)
		word = []
		for i in range(k):
			word.append(alphab.pop())
		for i in range(n - k):
			word.append(word[i])
	return ''.join(word)
(n, k) = input().split()
print(pswrd(int(n), int(k)))


def solution(l1):
	alfie = 'abcdefghijklmnopqrstuvwxyz'
	snippet = alfie[:l1[1]]
	c_out = (snippet * l1[0])[:l1[0]]
	return c_out

def answer():
	l1 = [int(x) for x in input().split()]
	print(solution(l1))
answer()


(N, M) = map(int, input().split())
if N <= M:
	for i in range(N):
		print(chr(ord('a') + i), end='')
else:
	for i in range(M):
		print(chr(ord('a') + i), end='')
	t = 0
	for i in range(N - M):
		print(chr(ord('a') + t), end='')
		t = 1 - t


(n, k) = map(int, input().strip().split())
hashmap = list('abcdefghijklmnopqrstuvwxyz')
r2 = ''
for i in range(0, n):
	r2 += hashmap[i % k]
print(r2)


import string
letters = string.ascii_lowercase
d = input()
s = d.split()
n = int(s[0])
k = int(s[1])
p = ''
j = 0
letters = letters[0:k]
letters = letters * (200 // k)
while True:
	p += letters[j]
	c = len(p)
	j = j + 1
	if c == n:
		break
print(p)


def index_in_list(a_list, index):
	return index < len(a_list)
(n, k) = map(int, input().split())
string = ''
letters = ''
for i in range(k):
	letters += chr(97 + i)
for i in range(n):
	if index_in_list(letters, i):
		string += letters[i]
	elif string[-1] == letters[-1]:
		string += letters[-2]
	else:
		string += letters[-1]
print(string)


s = ''
(n, k) = map(int, input().split())
for i in range(k):
	s += chr(97 + i)
remain_length = n - len(s)
if remain_length > 0:
	s += s * (remain_length // len(s))
add_length = n - len(s)
if add_length > 0:
	s += s[:add_length]
print(s)


(n, k) = map(int, input().split())
alfabet = []
s = ''
for x in range(k):
	alfabet.append(chr(97 + x))
for x in range(n):
	s += alfabet[x % k]
print(s)


(n, k) = map(int, input().split())
from string import ascii_lowercase as s
print(''.join((s[i % k] for i in range(n))))


import string
ALPHABETS = string.ascii_lowercase

def getNewPassword(n, k):
	newPassword = ''
	for i in range(n):
		newPassword += ALPHABETS[i % k]
	return newPassword
constrains = input().strip().split()
n = int(constrains[0])
k = int(constrains[1])
res = getNewPassword(n, k)
print(res)


import random
s = input()
s = s.split()
n = int(s[0])
k = int(s[1])
x = '1'
temp = 0
ut = ['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):
	if temp < k and ut[temp] != ut[temp - 1]:
		x += ut[temp]
		temp += 1
		if temp == 26:
			temp = 0
	else:
		bleh = 0
		while ut[bleh] == ut[temp]:
			bleh = random.randint(0, temp)
		x += ut[bleh]
		temp = bleh
		temp += 1
		if temp == 26:
			temp = 0
print(x[1:])


import string
(n, k) = input().split(' ')
my_str = ''
for i in range(0, int(k)):
	my_str += string.ascii_letters[i]
if k != '0':
	my_str *= int(n) // int(k)
	for i in range(0, int(n) % int(k)):
		my_str += string.ascii_letters[i]
else:
	my_str += 'a'
	my_str *= int(n)
print(my_str)


list1 = input().strip().split()
list2 = []
for i in range(int(list1[1])):
	list2.append(chr(97 + i))
s = ''
for i in range(int(list1[0])):
	s += list2[i % int(list1[1])]
print(s)


(n, k) = map(int, input().split())
letter = [chr(97 + i) for i in range(k)]
password = ''
i = 0
while n > 0:
	password += letter[i]
	if i == k - 1:
		i -= 1
	else:
		i += 1
	n -= 1
print(password)


alph = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
letters = alph[:k]
print((letters * (n // k + 1))[:n])


(n, k) = map(int, input().split())
nxt = -1
for i in range(n):
	nxt += 1
	nxt %= k
	print(chr(nxt + 97), end='')


(n, k) = map(int, input().split())
words = [chr(i) for i in range(97, 97 + k)]
pwd = ''.join(words)
pwd = pwd * n
print(pwd[:n])


from string import ascii_lowercase
import random
(n, k) = [int(v) for v in input().split()]
print(''.join(ascii_lowercase[:k] * (n // k + 1))[:n])


(n, k) = input().split()
n = int(n)
k = int(k)
char_num = 1
while char_num <= n:
	for i in range(0, k):
		print(chr(ord('a') + i), end='')
		char_num += 1
		if char_num > n:
			break


from sys import stdin, stdout

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()
(n, k) = get_ints()
j = 97
s = ''
for i in range(n):
	if j - 97 < k:
		s += chr(j)
	else:
		j = 97
		s += chr(j)
	j += 1
print(s)


def main():
	(n, k) = map(int, input().split())
	res = ''
	for i in range(min(k, n)):
		res += chr(ord('a') + i)
	for i in range(k, n):
		res += res[i - k]
	print(res)
main()


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


(n, k) = map(int, input().strip().split())
q = (n + k - 1) // k
s = ''
for i in range(q):
	for j in range(k):
		if len(s) < n:
			s += chr(ord('a') + j)
		else:
			break
print(s)


(X, Temp) = (list(map(int, input().split())), '')
for i in range(X[1]):
	Temp += chr(ord('a') + i)
print(Temp * (X[0] // X[1]) + Temp[:X[0] % X[1]])


(l, a) = input().split()
l = int(l)
alpha = int(a)
strt = ord('a')
password = ''
for i in range(l):
	if alpha >= l:
		password += chr(strt + i)
	else:
		password += chr(strt + i % alpha)
print(password)


(n, k) = map(int, input().split())
ans = ''
i = 96
j = 0
while len(ans) <= n:
	j += 1
	i += 1
	ans += chr(i)
	if j == k:
		i = i - k
		j = 0
print(ans[:n])


(n, d) = list(map(int, input().split()))
a = 'abcdefghijklmnopqrstuvwxyz'
w = ''
i = 0
while len(w) != n:
	if i == d:
		i = 0
		w += a[i]
	else:
		w += a[i]
	i += 1
print(w)


(n, k) = map(int, input().split(' '))
let = 'qwertyuioplkjhgfdsazxcvbnm'
res = ''
for i in range(n):
	res += let[i % k]
print(res)


import random
inputdata = input().split(' ')
n = int(inputdata[0])
k = int(inputdata[1])
str1 = 'qwertyuiopasdfghjklzxcvbnm'
i = 0
str2 = []
num_k = 0
while i < n:
	if num_k < k:
		str2 += random.choice(str1)
		str1 = str1.replace(str2[i], '')
		num_k += 1
	else:
		str2 += random.choice(str2)
		if str2[i] == str2[i - 1]:
			str2[i] = str2[i - 2]
	i += 1
str3 = ''.join(str2)
print(str3)


import string
import random
(n, k) = input().split()
n = int(n)
k = int(k)
s = string.ascii_lowercase
p = random.sample(s, k)
pas = ''
d = 0
for i in range(k):
	pas += p[i]
while n:
	if n > k:
		print(pas, end='')
		n -= k
	elif n == k:
		print(pas, end='')
		n = 0
	else:
		for i in range(n):
			print(pas[i], end='')
		n = 0


import random
(n, k) = map(int, input().split())
s = []
a = []
ans = ''
for i in range(97, 123):
	s.append(i)
for i in range(k):
	b = random.choice(s)
	a.append(chr(b))
	s.remove(b)
p = 0
for i in range(n):
	ans += a[p]
	p += 1
	if p > len(a) - 1:
		p = 0
print(ans)


s = str(input()).split()
n = int(s[0])
k = int(s[1])
ct = n / k
str = ''
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')
if n >= 2 and n <= 100 and (k >= 2) and (k <= min(n, 26)):
	for u in range(int(ct)):
		for j in range(k):
			str = str + l[j]
	for i in range(int(n - k * int(ct))):
		str = str + l[i]
	print(str)
else:
	print('LOL')


import string
u = input().split()
n = int(u[0])
k = int(u[1])
pw = string.ascii_lowercase
pww = ''
for i in range(k):
	pww = pww + pw[i]
strr = ''
for i in range(int(n / k)):
	strr = strr + pww
for i in range(n % k):
	strr = strr + pww[i]
print(strr)


import string
import math

def input_int():
	return list(map(int, input().split()))
alphabet = string.ascii_lowercase
[n, k] = input_int()
print((alphabet[:k] * math.ceil(n / k))[:n])


(n, k) = input().split()
n = int(n)
k = int(k)
answer = []
for i in range(k):
	answer += chr(ord('a') + i)
answer *= n // k
for i in range(n % k):
	answer += chr(ord('a') + i)
print(''.join(answer))


inp = input()
n = int(inp.split()[0])
k = int(inp.split()[1])
letters = 'abcdefghijklmnopqrstuvwxyz'
print(letters[:k] * (n // k) + letters[:n % k])


(n, k) = [int(i) for i in input().split()]
letters = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	print(letters[i % k], end='')


(n, k) = (int(x) for x in input().split())
pwd = [chr(ord('a') + i % k) for i in range(n)]
print(*pwd, sep='')


def buildPassword(n, k):
	passWord = ''
	for i in range(n):
		passWord += str(chr(97 + i % k))
	return passWord
(n, k) = [int(x) for x in input().split(' ')]
print(buildPassword(n, k))


(n, k) = map(int, input().split())
f = 0
ps = ''
for i in range(n):
	ps += chr(f % k + 97)
	f += 1
print(ps)


(a, b) = input().split(' ')
a = int(a)
b = int(b)
c = 'abcdefghijklmnopqrstuvwxyz'
d = []
i = 0
j = 0
while i < 26:
	d.append(c[i])
	i = i + 1
i = 0
k = 0
while i < a:
	if k == b:
		k = 0
	if i >= b and k != b:
		print(d[k], end='')
		k = k + 1
		i = i + 1
	while i < b:
		print(d[i], end='')
		i = i + 1


import string, random
(n, k) = map(int, input().split())
li = 'abcdefghijklmnopqrstuvwxyz'
word = ''
word += li[0:k]
while len(word) < n:
	ch = random.choice(word)
	if word[-1] != ch:
		word += ch
print(word)


(n, d) = map(int, input().split())
l = []
for i in range(d):
	l.append(chr(97 + i))
for i in range(n - d):
	l.append(l[i])
print(''.join(l))


s = input().split()
dl = int(s[0])
k = int(s[1])
pred = 0
password = list()
e = 0
while True:
	for i in range(0, k):
		password.append(chr(i + 97))
		e += 1
		if e == dl:
			break
	if e == dl:
		break
print(''.join(map(str, password)))


alph = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
a = alph[:k]
s = 'a'
for i in range(1, n):
	s += alph[i % k]
print(s)


from sys import stdin, stdout
(n, k) = map(int, stdin.readline().split())
ans = ''
for i in range(min(n, k)):
	ans += chr(ord('a') + i)
ind = k
while ind < n:
	ans += 'a'
	ind += 1
	if ind < n:
		ans += 'b'
		ind += 1
stdout.write(ans)


(n, k) = map(int, input().split())
x = n - k
a = 'ab'
while x > 0:
	a += 'a'
	x -= 1
	if x == 0:
		break
	else:
		a += 'b'
		x -= 1
x = n - len(a)
f = 99
while x > 0:
	a += chr(f)
	x -= 1
	f += 1
print(a)


(n, k) = map(int, input().strip(' ').split())
lis = []
for i in range(k):
	lis.append(chr(97 + i))
	i = 0
while n > 0:
	if i == k:
		i = 0
	print(lis[i], end='')
	i += 1
	n -= 1


(n, k) = map(int, input().split())
abc = 'abcdefghijklmnopqrstuvwxyz'
f = abc[:k]
s = f
while len(s) < n:
	s += f
s = s[:n]
print(s)


import math
(n, m) = map(int, input().strip().split()[:2])
k = [chr(x) for x in range(97, 97 + m)]
p = ''.join(k)
p += p * math.ceil(n / m)
p = p[:n]
print(p)


password = ''
(n, k) = list(map(int, input().split()))
alph = [chr(i) for i in range(97, 97 + k)]
for i in range(n):
	password += alph[i % k]
print(password)


import string
(n, m) = map(int, input().split())
x = list(string.ascii_lowercase)
x = x[:m]
q = 0
password = ''
for i in range(n):
	password = password + x[q]
	q = q + 1
	if q == m:
		q = 0
print(password)


(n, k) = map(int, input().split())
print(('abcdefghijklmnopqrstuvwxyz'[0:k] * ((n + k - 1) // k))[0:n])


(x, y) = map(int, input().split())
s = 'qwertyuiopasdfghjklzxcvbnm'
print(s[:y] * (x // y) + s[:x % y])


import math
(length, distinct) = map(int, input().split())
r = math.ceil(length / distinct)
str1 = ''
for x in range(97, 97 + distinct):
	str1 += chr(x)
str2 = str1 * r
print(str2[:length])


(n, k) = map(int, input().split())
seq = [chr(97 + i) for i in range(k)]
p = -1
for i in range(n):
	p = p + 1 if p < k - 1 else 0
	print(seq[p], end='')
print()


import random
(n, k) = map(int, input().split())
p = ''
l = []
while len(l) != k:
	y = random.randint(97, 122)
	if chr(y) not in l:
		l.append(chr(y))
while len(p) != n:
	for i in l:
		if len(p) != n:
			p += i
		else:
			break
print(p)


import random as rand
li = []
for i in range(0, 26):
	x = chr(97 + i)
	li.append(x)
(n, k) = map(int, input().split(' '))
sub1 = li[:k]
sub1 = sub1 * (n // k)
sub2 = sub1[:n % k]
ans = sub1 + sub2
for i in range(0, len(ans)):
	print(ans[i], end='')


import random
L = input().split(' ')
n = int(L[0])
k = int(L[1])
password = ''
a = 0
for i in range(n):
	password += chr(97 + a)
	a = (a + 1) % k
print(password)


(n, k) = map(int, input().split())
import random

def generate_number(upper):
	return random.randint(0, upper - 1)
distinct = []
password = ''
for i in range(k):
	distinct.append(chr(97 + i))
for item in distinct:
	password += item
while len(password) < n:
	no = generate_number(k)
	char = distinct[no]
	if len(password) == 0:
		password += char
	elif char != password[-1]:
		password += char
print(password)


from random import randint
x = [int(x) for x in input().split(' ')]
m = []
i = 0
while i < x[1]:
	c = chr(randint(97, 122))
	if c in m:
		i -= 1
	else:
		m.append(c)
	i += 1
rest = x[0] - x[1]
for i in range(rest):
	m.append(m[i])
for i in m:
	print(i, end='')


alph = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
c = alph[:k]
i = 0
while len(c) < n:
	c += c[i]
	i += 1
print(c)


(n, k) = map(int, input().split())
i = 1
ii = 1
kek = ''
while i <= n:
	if ii == k:
		kek += chr(96 + ii)
		ii = 1
	else:
		kek += chr(96 + ii)
		ii += 1
	i += 1
print(kek)


(n, k) = map(int, input().split())
l = []
w = []
for i in range(k):
	l.append(chr(97 + i))
for i in range(n):
	w.append(''.join(l))
q = ''.join(w)
print(q[:n])


s = 'abcdefghijklmnopqrstuvwxyz'
lt = list(input().split())
(n, k) = (int(lt[0]), int(lt[1]))
s = s[:k]
s = s * (n // k)
s += s[:n % k]
print(s)


import random

def f(m):
	p1 = []
	while len(p1) != m:
		c = chr(random.randint(97, 122))
		if c not in p1:
			p1.append(c)
	return ''.join(p1)
(n, k) = map(int, input().split(' '))
if k > n:
	end = n
	print(f(end))
elif k == n:
	end = n
	print(f(end))
else:
	end = k
	a = n // k
	b = n % k
	p = f(k)
	r = p * a + p[:b]
	print(r)


x = 'abcdefghijklmnopqrstuvwxyz'
y = ''
cnt = 0
(a, b) = map(int, input().split())
y += x[0:b] * (a // b)
y += x[0:a % b]
print(y)


from sys import stdin, stdout
from os import path
if path.exists('input.txt'):
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

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

	def S():
		return stdin.readline().rstrip()

	def Sn():
		return stdin.readline().split(' ')

	def Out(whatever):
		return stdout.write(whatever)
import string
(n, k) = In()
answer = ['']
s = string.ascii_lowercase
answer[0] = s[:k]
answer.extend(['ab' for _ in range((n - k) // 2)])
if n - k & 1:
	answer.append('a')
Out(''.join(answer))


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

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

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
s = ''
(n, k) = mi()
for i in range(n):
	s += chr(ORDA + i % k)
print(s)


(n, k) = map(int, input().split())
s = ''
o = ord('a')
p = 0
for i in range(n):
	s += chr(o + p)
	if p < k - 1:
		p += 1
	else:
		p = 0
print(s)


(n, k) = [int(n) for n in input().split()]
s = 'abcdefghijklmnopqrstuvwxyz'
p = s[0:k]
q = p * n
print(q[0:n])


(lambda n, k: print(*([chr(i + ord('a')) for i in range(k)] * (n // k + 1))[:n], sep=''))(*map(int, input().split()))


from random import choice
from itertools import cycle
alphabet = 'abcdefghijklmnopqrstuvwxyz'
(n, k) = map(int, input().split())
letters = set()
while len(letters) < k:
	letters.add(choice(alphabet))
letters = cycle(letters)
password = []
for i in range(n):
	password.append(next(letters))
print(''.join(password))


(a, b) = map(int, input().split())
d = 'abcdefghijklmnopqrstuvwxyz'
l = d[0:b]
k = ''
t = 0
while len(k) != a:
	if t < b:
		k += l[t]
		t += 1
	elif t >= b:
		t = 0
print(k)


import string
(n, k) = map(int, input().split())
symbs = []
letters = string.ascii_lowercase[:k]
last = 0
for i in range(n):
	symbs.append(letters[last])
	last += 1
	if last == k:
		last = 0
print(''.join(symbs))


import math
alphabet = 'qwertyuiopasdfghjklzxcvbnm'
(n, k) = input().split()
n = int(n)
k = int(k)
pattern = alphabet[:k]
print((pattern * math.ceil(n / k))[:n])


(n, k) = map(int, input().split())
letters = []
password = str()
for i in range(k):
	letters.append(chr(97 + i))
	password += chr(97 + i)
	preLetter = chr(97 + i)
preLetter = chr(97 + i)
for i in range(n - k):
	flag = True
	b = 0
	while flag:
		Letter = chr(97 + b)
		if Letter != preLetter:
			password += Letter
			preLetter = Letter
			flag = False
		b += 1
		if 97 + b == 122:
			b = 0
print(password)


(n, k) = list(map(int, input().split()))
s = 'abcdefghijklmnopqrstuvwxyz'
need = s[:k]
result = ''
for i in range(n):
	result += need[i % len(need)]
print(result)


a = ['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']
(x, y) = input().split()
n = int(x)
m = int(y)
string = ''
if n == m:
	for i in range(0, n):
		string = string + a[i]
else:
	rounds = int(n / m)
	rounds2 = n % m
	for i in range(0, rounds):
		for j in range(0, m):
			string = string + a[j]
	for i in range(0, rounds2):
		string = string + a[i]
print(string)


from string import ascii_lowercase
from random import randint
(n, k) = map(int, input().split())
password = ''
start = 0
for _ in range(n):
	if start >= k:
		start = 0
	password += ascii_lowercase[start]
	start += 1
print(password)


import random
(n, k) = map(int, input().split(' '))
alph = 'abcdefghijklmnopqrstuvwxyz'
password = ''
i = 0
while i < k:
	letter = random.choice(alph)
	if letter not in password:
		password += letter
		i += 1
repetitions = n / k
password = password * int(repetitions)
rep_int = n - int(repetitions) * k
if n % k != 0:
	for i in range(rep_int):
		password += password[i]
print(password)


import string
alphabet = string.ascii_lowercase
(n, k) = map(int, input().split())
le = min(k, 26)
index = 0
result = ''
for i in range(1, n + 1):
	result += alphabet[int(index)]
	index += 1
	if index >= k:
		index = 0
print(result)


import random
(n, m) = map(int, input().split())
z = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	print(z[i % m], end='')


from sys import stdin, stdout
from math import gcd, sqrt, floor, ceil
input = stdin.readline

def list_inp(x):
	return list(map(x, input().split()))

def map_inp(x):
	return map(x, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)
s1 = 'abcdefghijklmnopqrstuvwxyz'
(a, b) = map_inp(int)
q = s1[:b]
q1 = q * a
print(q1[:a])


(n, k) = tuple(map(int, input('').split(' ')))
pan = 'abcdefghijklmnopqrstuvwxyz'
res = ''
while len(res) < n:
	res += pan[0:k]
print(res[0:n])


z = [int(el) for el in input().split()]
k = z[1]
n = z[0]
res = ''
to_use = [chr(i) for i in range(65 + 32, 65 + 32 + k)]
i = 0
while not len(res) == n:
	res += to_use[i]
	i = int((i + 1) % len(to_use))
print(res)


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


(n, k) = map(int, input().split())
A = [chr(i) for i in range(ord('a'), ord('z') + 1)]
for i in range(n):
	print(A[i % k], end='')
print()


import string
l = string.ascii_letters
(n, k) = map(int, input().split())
total = ''
for i in range(k):
	total += l[i]
c = 0
for j in range(n - k):
	if c == k:
		c = 0
		total += l[c]
		c += 1
	else:
		total += l[c]
		c += 1
print(total)


(a, b) = map(int, input().split())
d = 'aeiouybcdfghjklmnpqrstvwxz'
f = d[:b]
g = ' '.join(f)
t = g.split()
h = t[:]
k = 0
while len(t) < a:
	t.append(t[k])
	k += 1
	if k > len(h) - 1:
		k = 0
print(''.join(t))


(n, k) = [int(x) for x in input().split()]
s = 'a'
letter_ind = 0
letter = 'a'
while len(s) < n:
	letter = chr((letter_ind + 1) % k + 97)
	s += letter
	letter_ind += 1
print(s)


import string
from math import trunc
a = list(map(int, input().split()))
length = a[0]
distinct = a[1]
alpha = string.ascii_lowercase
out = alpha[0:distinct]
times = trunc(length / distinct)
for i in range(times):
	print(out, end='')
rest = length - times * distinct
print(out[0:rest])


def main():
	(password_length, ndistinct_letters) = map(int, input().split())

	def new_password(password_length, ndistinct_letters):
		distinct_letters = [chr(letter) for letter in range(ord('a'), ord('a') + ndistinct_letters)]
		(password, current_index) = ('', 0)
		while len(password) < password_length:
			if current_index == len(distinct_letters):
				current_index = 0
			password += distinct_letters[current_index]
			current_index += 1
		return password
	print(new_password(password_length, ndistinct_letters))
main()


from sys import stdin
(n, k) = map(int, stdin.readline().rstrip().split())
m = n
while m > 0:
	print(chr(ord('a') + (n - m) % k), end='')
	m -= 1


(n, k) = map(int, input().split())
a = 'abcdefghijklmnopqrstuvwxyz'
b = a[0:k]
i = 0
while n != len(b):
	b = b + b[i]
	i += 1
	if i == k:
		i = 0
print(b)


dictionary = {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7: 'g', 8: 'h', 9: 'i', 10: 'j', 11: 'k', 12: 'l', 13: 'm', 14: 'n', 15: 'o', 16: 'p', 17: 'q', 18: 'r', 19: 's', 20: 't', 21: 'u', 22: 'v', 23: 'w', 24: 'x', 25: 'y', 26: 'z'}
(n, distinct) = list(map(int, input().split()))
count = 0
st = ''
for i in range(distinct):
	st += dictionary[i + 1]
st2 = ''
for _ in range(n):
	st2 += st[count]
	count += 1
	if count > distinct - 1:
		count = 0
print(st2)


(n, k) = [int(c) for c in input().split(' ')]
aCode = ord('a')
(passwd, temp) = ('', '')
for i in range(0, k):
	temp += chr(aCode + i)
count = n // k
rest = n % k
passwd = temp * count
if rest > 0:
	passwd += temp[:rest]
print(passwd)


(n, k) = map(int, input().split())
if k == 26:
	unique = [int(i) for i in range(1, 27)]
else:
	import random
	unique = random.sample(range(1, 26), k)
result = []
for i in range(n):
	result.append(chr(97 + unique[i % len(unique)] % 26))
print(''.join(result))


import random
import string

def randomString(stringLength):
	letters = string.ascii_lowercase
	return ''.join(random.sample(letters, stringLength))
(n, m) = [int(x) for x in input().split()]
s = randomString(m)
i = 0
while len(s) != n:
	s = s + s[i]
	i += 1
print(s)


(password_length, distinct_symbols) = input().split(' ')
password_length = int(password_length)
distinct_symbols = int(distinct_symbols)
l = []
for i in range(97, 123):
	if chr(i) not in l:
		l.append(chr(i))
	if len(l) == password_length:
		break
string = ''
for i in range(0, distinct_symbols):
	string = string + l[i]
if len(string) == password_length:
	print(string)
else:
	le = len(string)
	le = password_length - le
	for i in range(0, le):
		string = string + l[0] + l[1]
	new_string = ''
	for i in range(0, password_length):
		new_string = new_string + string[i]
	print(new_string)


import string
(n, k) = map(int, input().split())
print(string.ascii_letters[:k] * (n // k) + string.ascii_letters[:n % k])


(n, k) = map(int, input().split())
alfabeto = ['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']
resp = ''
for i in range(k):
	resp += alfabeto[i]
repeticao = len(resp)
j = 0
acabar = n - repeticao
while acabar != 0:
	resp += alfabeto[j]
	j += 1
	if j > k - 1:
		j = 0
	acabar -= 1
for j in range(n - len(resp)):
	resp += alfabeto[j]
print(resp)


(n, k) = map(int, input().split())
password = ''
let = 'abcdefghijklmnopqrstuvwxyz'
lis = list(let[:k])
i = 0
while i < n:
	if i > len(lis) - 1:
		password += lis[i % len(lis)]
		i += 1
		continue
	password += lis[i]
	i += 1
print(password)


(n, k) = [int(i) for i in input().split()]
pattern = [chr(i) for i in range(ord('a'), ord('a') + k)]
num = n // len(pattern)
print(''.join(pattern) * num + ''.join(pattern[:n - num * len(pattern)]))


(a, b) = map(int, input().split())
l = 'abcdefghijklmnopqrstuvwxyz'
s = l[:b]
u = a // b
s = s * u
r = a - b * u
s = s + l[:r]
print(s)


(n, k) = map(int, input().split())
t = 0
while t != n:
	c = 97
	for j in range(k):
		print(chr(c), end='')
		c += 1
		t += 1
		if t == n:
			break


(n, k) = map(int, input().split())
start = 97
for j in range(k):
	print(chr(start), end='')
	start += 1
	n -= 1
if n % 2 == 0:
	print('ab' * (n // 2), end='')
else:
	print('ab' * (n // 2) + 'a', end='')


alpha = 'qwertyuiopasdfghjklzxcvbnm'
(n, k) = tuple(map(int, input().split(' ')))
print(alpha[:k] * (n // k) + alpha[:n % k])


(n, k) = map(int, input().split(' '))
l = []
c = 97
s = ''
for i in range(k):
	s = s + chr(c)
	l.append(c)
	c += 1
if len(s) == n:
	print(s)
else:
	for i in range(len(s), n):
		if len(s) < n:
			s = s + chr(l[0])
		if len(s) < n:
			s = s + chr(l[1])
		if len(s) == n:
			break
	print(s)


(nx, kx) = input().split()
n = int(nx)
k = int(kx)
word = []
letters = list('abcdefghijklmnopqrstuvwxyz ')
for i in range(k):
	word.append(letters[i])
i = 0
while n > len(word):
	word.append(word[i])
	i += 1
print(''.join(word))


import string
l = list(string.ascii_lowercase)
st1 = ''.join(l)
(n, k) = input().split()
n = int(n)
k = int(k)
temp = st1[:k]
count = 0
while len(temp) < n:
	temp = temp + st1[count]
	if count < k - 1:
		count = count + 1
	else:
		count = 0
print(temp)


(n, k) = map(int, input().split())
dict = ['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']
mas = dict[:k]
string = ''
for i in range(len(mas)):
	string += mas[i]
for i in range(n - k):
	if i % 2 == 0:
		string += dict[0]
	else:
		string += dict[1]
print(string)


(n, k) = input().split()
n = int(n)
k = int(k)
Alpha = 'abcdefghijklmnopqrstuvwxyz'
res = Alpha[0:k]
i = 0
while n != len(res):
	res = res + res[i]
	i = i + 1
	if i == k:
		i = 0
print(res)


(n, k) = map(int, input().split())
alph = 'qwertyuiopasdfghjklzxcvbnm'
print(alph[:k] * (n // k) + alph[:n % k])


(n, k) = map(int, input().split())
z = 0
s = ''
for i in range(n):
	s += chr(z + 97)
	if z < k - 1:
		z += 1
	else:
		z = 0
print(s)


(n, k) = map(int, input().strip().split(' '))
s = ''
k += 97
for i in range(97, k):
	s += chr(i)
s = n * s
for i in range(n):
	print(s[i], end='')


(n, k) = list(map(int, input().split()))
for i in range(n):
	print(chr(ord('a') + i % k), end='')


(n, k) = input().split()
(n, k) = (int(n), int(k))
a = 'abcdefghijklmnopqrstuvwxyz'
s = []
for i in range(n):
	s.append(a[i % k])
s = ''.join(s)
print(s)


import random
(n, k) = map(int, input().split())
password = ''
d = [chr(x) for x in range(ord('a'), ord('z') + 1)]
l = random.sample(d, k)
for i in range(0, n):
	password += l[i % k]
print(password)


(n, k) = map(int, input().split())
r = n - k
distinct = []
password = []
alphapet = []
for i in range(97, 123):
	alphapet.append(chr(i))
for m in range(k):
	distinct.append(alphapet[m])
if n == k:
	print(''.join(distinct))
else:
	password = distinct
	for l in range(r):
		password.append(distinct[l])
print(''.join(password))


(n, k) = map(int, input().split())
alp = []
for i in range(k):
	alp.append(chr(97 + i))
ans = ''
for i in range(n):
	ans += alp[i % len(alp)]
print(ans)


import sys
(n, k) = map(int, input().split())
ss = [chr(x) for x in range(ord('a'), ord('a') + k)]
s = ''
while len(s) < n:
	s += ''.join(ss)
print(s[:n])


(n, k) = eval(input().rstrip().replace(' ', ','))
k = min(k, 26)
letters = [chr(i) for i in range(97, 123)]
for i in range(n):
	print(letters[i % k], end='')