#include <algorithm>
#include <iostream>
#include <cassert>
using namespace std;

enum Face { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
struct Dice {
    Dice() {
        for (int i = 0; i < 6; ++i)
            id[Face(i)] = i;
    }

    int& operator[](Face f) { return number[id[f]]; }
    const int& operator[](Face f) const { return number[id[f]]; }

    void roll_east() { roll_impl(TOP, RIGHT, BOTTOM, LEFT); }
    void roll_west() { roll_impl(TOP, LEFT, BOTTOM, RIGHT); }
    void roll_north() { roll_impl(TOP, FRONT, BOTTOM, BACK); }
    void roll_south() { roll_impl(TOP, BACK, BOTTOM, FRONT); }

    void roll(char dir) {
        switch (dir) {
        case 'E': roll_east(); break;
        case 'W': roll_west(); break;
        case 'N': roll_north(); break;
        case 'S': roll_south(); break;
        default: assert(false);
        }
    }

    void print() {
        cout << "{ ";
        cout << "top=" << number[id[TOP]] << ", ";
        cout << "front=" << number[id[FRONT]] << ", ";
        cout << "left=" << number[id[LEFT]] << ", ";
        cout << "back=" << number[id[BACK]] << ", ";
        cout << "right=" << number[id[RIGHT]] << ", ";
        cout << "bottom=" << number[id[TOP]];
        cout << " }";
    }

private:
    void roll_impl(Face a, Face b, Face c, Face d) {
        int tmp = id[a];
        id[a] = id[b];
        id[b] = id[c];
        id[c] = id[d];
        id[d] = tmp;
    }

    int id[6];
    int number[6];
};

string solve(Dice dice) {
    string answer;
    for (;;) {
        bool goal = true;
        for (int i = 0; i < 6; ++i) {
            if (dice[Face(i)] != 0) {
                goal = false;
                break;
            }
        }
        if (goal)
            return answer;

        static const char dirs[]  = {'E', 'N', 'S', 'W'};
        bool ok = false;
        for (int i = 0; i < 4; ++i) {
            Dice next = dice;
            next.roll(dirs[i]);
            if (next[BOTTOM] == 0)
                continue;
            next[BOTTOM] = next[BOTTOM] - 1;
            int a = next[TOP] + next[BOTTOM];
            int b = next[LEFT] + next[RIGHT];
            int c = next[FRONT] + next[BACK];
            if (a > b + c)
                continue;
            if (b > 1 + c + a)
                continue;
            if (c > 1 + a + b)
                continue;
            dice = next;
            answer.push_back(dirs[i]);
            ok = true;
            break;
        }

        /*
        cout << "answer=" << answer << ", dice=";
        dice.print();
        cout << endl;
        */

        if (!ok)
            return "impossible";
    }
}

int main() {
    for (;;) {
        int t[6];
        for (int i = 0; i < 6; ++i)
            cin >> t[i];
        if (!t[0] && !t[1] && !t[2] && !t[3] && !t[4] && !t[5])
            break;
        int p, q;
        cin >> p >> q;

        string answer = "impossible";
        do {
            Dice dice;
            for (int i = 0; i < 6; ++i)
                dice[Face(i)] = t[i];
            string a = solve(dice);
            answer = min(answer, a);
        } while (next_permutation(t, t+6));

        if (answer == "impossible")
            cout << "impossible" << endl;
        else
            cout << answer.substr(p-1, q-p+1) << endl;
    }
}

Measured memory_bytes: 1312