Limits 1s, 512 MB

As a Bangladeshi cricket fan, this World Cup was not a good memory for us. The only positive aspect for us was that the World Cup final, in which the team should have won, ended in a loss, and the winner was Australia.

From this, the setter got an idea of rotating a grid. Idea is,

Let's delve into the problem statement,

Suppose you have an empty grid with 55 rows and 55 columns. Additionally, you are given frequency of the lowercase Latin letters that you only use to fill the empty grid.

Your task is to fill the empty grid with the provided lowercase Latin letters (don’t have to use all of the letters every time) in a manner that ensures the grid remains unchanged when rotated anti-clockwise by 9090, 180180, or 270270 degrees. You can’t leave any cell empty.

Input

The only line of the input contains 2626 integer numbers Fi (1i26)F_i \ (1 \leq i \leq 26) separated by space — representing frequency of lowercase Latin letters.

You can use at most F1,F2,F3,,F26F_1, F_2, F_3,…,F_{26} times a,b,c,,za,b,c,…,z respectively to fill the grid.

0Fi250 \leq F_i \leq 25

Output

If it is impossible to fill the empty grid according to your task, print a single line containing “no" without quotes.

Otherwise, print a single line containing “yes” without quotes, followed by 55 lines each containing 55 lowercase Latin letters, which describe the final state of the grid.

If there are multiple possible answers, you may print any of them.

Samples

InputOutput
4 4 4 4 0 0 0 0 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
yes
abcda
dijib
cjzjc
bijid
adcba
InputOutput
0 4 0 0 0 0 0 0 0 0 3 0 0 0 4 0 0 0 0 4 0 0 0 4 0 4
no

Submit

Login to submit.

Statistics

60% Solution Ratio
pathanEarliest, 5M ago
refred1.100Fastest, 0.0s
refred1.100Lightest, 6.0 MB
refred1.100Shortest, 1055B
Toph uses cookies. By continuing you agree to our Cookie Policy.