Problem: A Die Maker

The work of die makers starts early in the morning.

You are a die maker. You receive orders from customers, and make various kinds of dice every day. Today, you received an order of a cubic die with six numbers t1, t2, ..., t6 on whichever faces.

For making the ordered die, you use a tool of flat-board shape. You initially have a die with a zero on each face. If you rotate the die by 90 degrees on the tool towards one of northward, southward, eastward, and southward, the number on the face that newly touches the tool is increased by one. By rotating the die towards appropriate directions repeatedly, you may obtain the ordered die.

The final numbers on the faces of the die is determined by the sequence of directions towards which you rotate the die. We call the string that represents the sequence of directions an operation sequence. Formally, we define operation sequences as follows. An operation sequence consists of n characters, where n is the number of rotations made. If you rotate the die eastward in the i-th rotation, the i-th character of the operation sequence is `E`. Similarly, if you rotate it westward, it is `W`, if southward, it is `S`, otherwise, if northward, it is `N`. For example, the operation sequence `NWS` represents the sequence of three rotations, northward first, westward next, and finally southward.

Given six integers of the customer's order, compute an operation sequence that makes a die to order. If there are two or more possibilities, you should compute the earliest operation sequence in dictionary order.

Input

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

> t1 t2 t3 t4 t5 t6
>  p q

t1, t2, ..., t6 are integers that represent the order from the customer. Further, p and q are positive integers that specify the output range of the operation sequence (see the details below).

Each dataset satisfies 0 ≤ t1 ≤ t2 ≤ ... ≤ t6 ≤ 5,000 and 1 ≤ p ≤ q ≤ t1+t2+...+t6. A line containing six zeros denotes the end of the input.

Output

For each dataset, print the subsequence, from the p-th position to the q-th position, inclusively, of the operation sequence that is the earliest in dictionary order. If it is impossible to make the ordered die, print `impossible`.

Here, dictionary order is recursively defined as follows. The empty string comes the first in dictionary order. For two nonempty strings x = x1 ... xk and y = y1 ... yl, the string x precedes the string y in dictionary order if

* x1 precedes y1 in alphabetical order ('A' to 'Z'), or
* x1 and y1 are the same character and x2 ... xk precedes y2 ... yl in dictionary order.



Sample Input


1 1 1 1 1 1
1 6
1 1 1 1 1 1
4 5
0 0 0 0 0 2
1 2
0 0 2 2 2 4
5 9
1 2 3 4 5 6
15 16
0 1 2 3 5 9
13 16
2 13 22 27 31 91
100 170
0 0 0 0 0 0


Output for the Sample Input


EEENEE
NE
impossible
NSSNW
EN
EWNS
SNSNSNSNSNSNSNSNSNSNSNSSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNWEWE






Example

Input

1 1 1 1 1 1
1 6
1 1 1 1 1 1
4 5
0 0 0 0 0 2
1 2
0 0 2 2 2 4
5 9
1 2 3 4 5 6
15 16
0 1 2 3 5 9
13 16
2 13 22 27 31 91
100 170
0 0 0 0 0 0


Output

EEENEE
NE
impossible
NSSNW
EN
EWNS
SNSNSNSNSNSNSNSNSNSNSNSSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNSNWEWE

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
#define popcount(n) (__builtin_popcountll(n))

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using namespace std;

class Dice{
	public:
		int l,r,f,b,d,u;
		Dice(){}
		Dice(int _l,int _r,int _f,int _b,int _d,int _u){
			l=_l,r=_r,f=_f,b=_b,d=_d,u=_u;
		}
		#define rotation(a,b,c,d) swap(a,b),swap(b,c),swap(c,d);

		void rot_f(){ rotation(f,u,b,d);}
		void rot_b(){ rotation(b,u,f,d);}
		void rot_l(){ rotation(l,u,r,d);}
		void rot_r(){ rotation(r,u,l,d);}

		inline bool valid(){
			if(l<0||r<0||f<0||b<0||d<0||u<0) return false;
			int na=u+d,nb=l+r,nc=f+b;
			if(na>nb+nc) return false;
			if(nb>na+nc+1) return false;
			if(nc>na+nb+1) return false;
			return true;
		}
};



int main(void){
	int t[6];
	while(1){
		rep(i,6) cin >> t[i];
		
		int n=0;
		rep(i,6) n+=t[i];
		if(n==0) break;

		string ans="impossible";

		do{
			Dice d(t[0],t[1],t[2],t[3],t[4],t[5]),nd;
			if(d.valid()==false) continue;
			string cur="";

			rep(loop,n){
				nd=d; nd.rot_r(),nd.d--;
				if(nd.valid()){
					cur+="E",d=nd;
					continue;
				}
				nd=d; nd.rot_b(),nd.d--;
				if(nd.valid()){
					cur+="N",d=nd;
					continue;
				}
				nd=d; nd.rot_f(),nd.d--;
				if(nd.valid()){
					cur+="S",d=nd;
					continue;
				}
				nd=d; nd.rot_l(),nd.d--;
				if(nd.valid()){
					cur+="W",d=nd;
					continue;
				}
			}
			if(ans=="impossible") 
				ans=cur;
			else
				chmin(ans,cur);
		}while(next_permutation(t,t+6));

		int p,q;
		cin >> p >> q;
		if(ans=="impossible")
			cout << ans << endl;
		else
		 	cout << ans.substr(p-1,q-p+1) << endl;
	}
	return 0;
}