Essay
Time limit1sMemory limit64 MB
Print B distinct words formed by mapping the decimal digits of 0 to B-1 to letters a to j.
- Level
Easy1 of 10
- Topics
- Implementation, String
- Solved
- No attempts yet
Problem
Final exams are close, and every high school senior has to write one essay in their native language. Mirko believes that this year a computer grades the essays instead of a person.
So Mirko decided to write an essay that does not have to make any sense, as long as it passes the machine check. An essay passes the check when all of the following hold.
- It has at least words and at most words.
- Every word has at least 1 letter and at most 15 letters.
- At least of its words are different from one another.
The essay is written on one line and uses only lowercase English letters and spaces. It carries no punctuation such as periods or commas, and its words do not have to be real English words.
Many essays satisfy the conditions, so exactly one output is accepted as correct. The output section gives the rule.
Input
The first and only line contains the integers and , separated by one space. ()
Output
Print words on one line, separated by one space each.
Build the -th word like this. Write in decimal without leading zeros, then replace the digits 0, 1, 2, ..., 9 with the letters a, b, c, ..., j. For example, gives a, gives j, and gives ba.
This essay has words and they are all different, so it satisfies every condition above.