New Password
- Giới hạn thời gian
- 1,0 s
- Giới hạn bộ nhớ
- 256 MB
- Điểm
- 1
- Tỉ lệ AC
- 71,4%
- Người giải
- 2
Xoan decides to change the password in the social net "Contact!", but she is too lazy to invent a new password by himself. That is why she needs your help.
Xoan decides that new password should satisfy the following conditions:
- the length of the password must be equal to
,
- the password should consist only of lowercase Latin letters,
- the number of distinct symbols in the password must be equal to
,
- any two consecutive symbols in the password must be distinct.
Your task is to help Xoan and to invent a new password which will satisfy all given conditions.
Input
- The first line contains two positive integers
and
\((2 \le n \le 100;\) \(2 \le k \le \min(n, 26))\)
the length of the password and the number of distinct symbols in it.
Output
- Print any password which satisfies all conditions given by Xoan. Pay attention that a desired new password always exists.
Samples
Sample Input 1
4 3Sample Output 1
javaSample Input 2
6 6Sample Output 2
pythonSample Input 3
5 2Sample Output 3
phphpClarification
In the first test there is one of the appropriate new passwords
java, because its length is equal to and
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 and it consists of
distinct lowercase letters.
In the third test there is one of the appropriate new passwords
phphp, because its length is equal to and
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.
Bình luận