A Die Maker

No attempts yetTime limit8sMemory limit256 MB

Problem

A die maker's day starts early in the morning.

You are a die maker. You take orders from customers and make many kinds of dice every day. Today's order is a cubic die with the six numbers t1,t2,,t6t_1, t_2, \ldots, t_6 written one per face. It does not matter which number goes on which face.

You make the die on a tool shaped like a flat board. You start with a die that has a zero on every face, resting on the tool. When you rotate the die by 90 degrees on the tool toward the north, the south, the east, or the west, the number on the face that newly touches the tool grows by one. By rotating the die toward suitable directions again and again, you can obtain the ordered die.

The final number on each face is decided by the sequence of directions you rotate the die toward. The string that represents that sequence of directions is called an operation sequence. Formally, an operation sequence consists of nn characters, where nn is the number of rotations made. If the ii-th rotation is eastward, the ii-th character of the operation sequence is E. In the same way it is W for westward, S for southward, and N for northward. For example, the operation sequence NWS represents three rotations, northward first, westward next, and southward last.

Given the six integers of a customer's order, compute an operation sequence that makes the ordered die. If two or more operation sequences are possible, compute the earliest one in dictionary order.

Input

The input consists of multiple datasets. The number of datasets does not exceed 40. Each dataset has the following form.

t1t_1 t2t_2 t3t_3 t4t_4 t5t_5 t6t_6

pp qq

t1,t2,,t6t_1, t_2, \ldots, t_6 are the integers of the customer's order. pp and qq are positive integers that specify the part of the operation sequence to print, and the output section gives the details.

Each dataset satisfies 0t1t2t650000 \le t_1 \le t_2 \le \cdots \le t_6 \le 5000 and 1pqt1+t2++t61 \le p \le q \le t_1 + t_2 + \cdots + t_6. A line containing six zeros denotes the end of the input.

Output

For each dataset, print on one line the characters from position pp to position qq, both included, of the operation sequence that is the earliest in dictionary order. If the ordered die cannot be made, print impossible.

Dictionary order is defined as follows. The empty string comes first. For two nonempty strings x=x1xkx = x_1 \cdots x_k and y=y1yly = y_1 \cdots y_l, the string xx precedes the string yy in dictionary order if

  • x1x_1 precedes y1y_1 in alphabetical order, from 'A' to 'Z', or
  • x1x_1 and y1y_1 are the same character and x2xkx_2 \cdots x_k precedes y2yly_2 \cdots y_l in dictionary order.