JMU F18 Week 13

Start

2018-11-30 19:30 UTC

JMU F18 Week 13

End

2018-12-06 21:00 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -112 days 13:01:59

Time elapsed

145:30:00

Time remaining

0:00:00

Problem C
The Weight Of Words

/problems/weightofwords/file/statement/en/img-0001.png
Justin likes to play a game called “Weight of Words.” In this game, a player must find words of a given length and a given weight. The weight of a word is the sum of the weights of its letters. Letters are English lowercase characters from ‘a’ to ‘z’ and have weights from $1 \ldots 26$.

You are asked to write an AI that can play this game!

Input

The input consists of a single line with two integers $l$ ($0 < l \le 40$) and $w$ ($0 < w \le 1000$).

Output

Output a string of length $l$ with weight $w$ consisting of lowercase English letters if it exists, otherwise output impossible. If more than one string exists, you may output any of them.

Sample Input 1 Sample Output 1
11 131
programming
Sample Input 2 Sample Output 2
7 96
contest
Sample Input 3 Sample Output 3
26 677
impossible