시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB35131031.250%

문제

A HAIKU is a string that consists of at most 50 lowercase English letters. For a HAIKU $s$, you can compute the hash $h$ as follows:

h = 0
for i=0,...|s|-1
    h = (h * a + (s[i] - 'a' + 1)) % b

You are given two integers $a$ and $b$. Construct 100 distinct HAIKUs that have the same hash.

입력

You are given two space-separated integers $a$ and $b$ ($b \le 10^9$, $26 \le a < b$).

출력

Print 100 HAIKUs with the same hash, one per line.

예제 입력 1

26 52

예제 출력 1

aaz
baz
caz
daz
...
zaz
aaaz
abaz
...
cuaz
cvaz

힌트

Several HAIKUs are omitted in the printed version of statements; the full version is published in the contest system.

채점 및 기타 정보

  • 예제는 채점하지 않는다.