QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#858136#2352. Maze with a HintthanhsAC ✓7ms4736kbC++2015.6kb2025-01-16 14:26:442025-01-16 14:26:45

Judging History

你现在查看的是最新测评结果

  • [2025-01-16 14:26:45]
  • 评测
  • 测评结果:AC
  • 用时:7ms
  • 内存:4736kb
  • [2025-01-16 14:26:44]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define name "TENBAI"
#define fi first
#define se second
// #define int long long
// #define endl '\n'
#define setmin(x, y) x = min((x), (y))
#define setmax(x, y) x = max((x), (y))
#define sqr(x) ((x) * (x))

typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;
const int base = 1000000000;
const int base_digits = 9; 
struct bigint {
    vector<int> a;
    int sign;
    /*<arpa>*/
    int size(){
        if(a.empty())return 0;
        int ans=(a.size()-1)*base_digits;
        int ca=a.back();
        while(ca)
            ans++,ca/=10;
        return ans;
    }
    bigint operator ^(const bigint &v){
        bigint ans=1,a=*this,b=v;
        while(!b.isZero()){
            if(b%2)
                ans*=a;
            a*=a,b/=2;
        }
        return ans;
    }
    string to_string(){
        stringstream ss;
        ss << *this;
        string s;
        ss >> s;
        return s;
    }
    int sumof(){
        string s = to_string();
        int ans = 0;
        for(auto c : s)  ans += c - '0';
        return ans;
    }
    /*</arpa>*/
    bigint() :
        sign(1) {
    }
 
    bigint(long long v) {
        *this = v;
    }
 
    bigint(const string &s) {
        read(s);
    }
 
    void operator=(const bigint &v) {
        sign = v.sign;
        a = v.a;
    }
 
    void operator=(long long v) {
        sign = 1;
        a.clear();
        if (v < 0)
            sign = -1, v = -v;
        for (; v > 0; v = v / base)
            a.push_back(v % base);
    }
 
    bigint operator+(const bigint &v) const {
        if (sign == v.sign) {
            bigint res = v;
 
            for (int i = 0, carry = 0; i < (int) max(a.size(), v.a.size()) || carry; ++i) {
                if (i == (int) res.a.size())
                    res.a.push_back(0);
                res.a[i] += carry + (i < (int) a.size() ? a[i] : 0);
                carry = res.a[i] >= base;
                if (carry)
                    res.a[i] -= base;
            }
            return res;
        }
        return *this - (-v);
    }
 
    bigint operator-(const bigint &v) const {
        if (sign == v.sign) {
            if (abs() >= v.abs()) {
                bigint res = *this;
                for (int i = 0, carry = 0; i < (int) v.a.size() || carry; ++i) {
                    res.a[i] -= carry + (i < (int) v.a.size() ? v.a[i] : 0);
                    carry = res.a[i] < 0;
                    if (carry)
                        res.a[i] += base;
                }
                res.trim();
                return res;
            }
            return -(v - *this);
        }
        return *this + (-v);
    }
 
    void operator*=(int v) {
        if (v < 0)
            sign = -sign, v = -v;
        for (int i = 0, carry = 0; i < (int) a.size() || carry; ++i) {
            if (i == (int) a.size())
                a.push_back(0);
            long long cur = a[i] * (long long) v + carry;
            carry = (int) (cur / base);
            a[i] = (int) (cur % base);
            //asm("divl %%ecx" : "=a"(carry), "=d"(a[i]) : "A"(cur), "c"(base));
        }
        trim();
    }
 
    bigint operator*(int v) const {
        bigint res = *this;
        res *= v;
        return res;
    }
 
    void operator*=(long long v) {
        if (v < 0)
            sign = -sign, v = -v;
        if(v > base){
            *this = *this * (v / base) * base + *this * (v % base);
            return ;
        }
        for (int i = 0, carry = 0; i < (int) a.size() || carry; ++i) {
            if (i == (int) a.size())
                a.push_back(0);
            long long cur = a[i] * (long long) v + carry;
            carry = (int) (cur / base);
            a[i] = (int) (cur % base);
            //asm("divl %%ecx" : "=a"(carry), "=d"(a[i]) : "A"(cur), "c"(base));
        }
        trim();
    }
 
    bigint operator*(long long v) const {
        bigint res = *this;
        res *= v;
        return res;
    }
 
    friend pair<bigint, bigint> divmod(const bigint &a1, const bigint &b1) {
        int norm = base / (b1.a.back() + 1);
        bigint a = a1.abs() * norm;
        bigint b = b1.abs() * norm;
        bigint q, r;
        q.a.resize(a.a.size());
 
        for (int i = a.a.size() - 1; i >= 0; i--) {
            r *= base;
            r += a.a[i];
            int s1 = r.a.size() <= b.a.size() ? 0 : r.a[b.a.size()];
            int s2 = r.a.size() <= b.a.size() - 1 ? 0 : r.a[b.a.size() - 1];
            int d = ((long long) base * s1 + s2) / b.a.back();
            r -= b * d;
            while (r < 0)
                r += b, --d;
            q.a[i] = d;
        }
 
        q.sign = a1.sign * b1.sign;
        r.sign = a1.sign;
        q.trim();
        r.trim();
        return make_pair(q, r / norm);
    }
 
    bigint operator/(const bigint &v) const {
        return divmod(*this, v).first;
    }
 
    bigint operator%(const bigint &v) const {
        return divmod(*this, v).second;
    }
 
    void operator/=(int v) {
        if (v < 0)
            sign = -sign, v = -v;
        for (int i = (int) a.size() - 1, rem = 0; i >= 0; --i) {
            long long cur = a[i] + rem * (long long) base;
            a[i] = (int) (cur / v);
            rem = (int) (cur % v);
        }
        trim();
    }
 
    bigint operator/(int v) const {
        bigint res = *this;
        res /= v;
        return res;
    }
 
    int operator%(int v) const {
        if (v < 0)
            v = -v;
        int m = 0;
        for (int i = a.size() - 1; i >= 0; --i)
            m = (a[i] + m * (long long) base) % v;
        return m * sign;
    }
 
    void operator+=(const bigint &v) {
        *this = *this + v;
    }
    void operator-=(const bigint &v) {
        *this = *this - v;
    }
    void operator*=(const bigint &v) {
        *this = *this * v;
    }
    void operator/=(const bigint &v) {
        *this = *this / v;
    }
 
    bool operator<(const bigint &v) const {
        if (sign != v.sign)
            return sign < v.sign;
        if (a.size() != v.a.size())
            return a.size() * sign < v.a.size() * v.sign;
        for (int i = a.size() - 1; i >= 0; i--)
            if (a[i] != v.a[i])
                return a[i] * sign < v.a[i] * sign;
        return false;
    }
 
    bool operator>(const bigint &v) const {
        return v < *this;
    }
    bool operator<=(const bigint &v) const {
        return !(v < *this);
    }
    bool operator>=(const bigint &v) const {
        return !(*this < v);
    }
    bool operator==(const bigint &v) const {
        return !(*this < v) && !(v < *this);
    }
    bool operator!=(const bigint &v) const {
        return *this < v || v < *this;
    }
 
    void trim() {
        while (!a.empty() && !a.back())
            a.pop_back();
        if (a.empty())
            sign = 1;
    }
 
    bool isZero() const {
        return a.empty() || (a.size() == 1 && !a[0]);
    }
 
    bigint operator-() const {
        bigint res = *this;
        res.sign = -sign;
        return res;
    }
 
    bigint abs() const {
        bigint res = *this;
        res.sign *= res.sign;
        return res;
    }
 
    long long longValue() const {
        long long res = 0;
        for (int i = a.size() - 1; i >= 0; i--)
            res = res * base + a[i];
        return res * sign;
    }
 
    friend bigint gcd(const bigint &a, const bigint &b) {
        return b.isZero() ? a : gcd(b, a % b);
    }
    friend bigint lcm(const bigint &a, const bigint &b) {
        return a / gcd(a, b) * b;
    }
 
    void read(const string &s) {
        sign = 1;
        a.clear();
        int pos = 0;
        while (pos < (int) s.size() && (s[pos] == '-' || s[pos] == '+')) {
            if (s[pos] == '-')
                sign = -sign;
            ++pos;
        }
        for (int i = s.size() - 1; i >= pos; i -= base_digits) {
            int x = 0;
            for (int j = max(pos, i - base_digits + 1); j <= i; j++)
                x = x * 10 + s[j] - '0';
            a.push_back(x);
        }
        trim();
    }
 
    friend istream& operator>>(istream &stream, bigint &v) {
        string s;
        stream >> s;
        v.read(s);
        return stream;
    }
 
    friend ostream& operator<<(ostream &stream, const bigint &v) {
        if (v.sign == -1)
            stream << '-';
        stream << (v.a.empty() ? 0 : v.a.back());
        for (int i = (int) v.a.size() - 2; i >= 0; --i)
            stream << setw(base_digits) << setfill('0') << v.a[i];
        return stream;
    }
 
    static vector<int> convert_base(const vector<int> &a, int old_digits, int new_digits) {
        vector<long long> p(max(old_digits, new_digits) + 1);
        p[0] = 1;
        for (int i = 1; i < (int) p.size(); i++)
            p[i] = p[i - 1] * 10;
        vector<int> res;
        long long cur = 0;
        int cur_digits = 0;
        for (int i = 0; i < (int) a.size(); i++) {
            cur += a[i] * p[cur_digits];
            cur_digits += old_digits;
            while (cur_digits >= new_digits) {
                res.push_back(int(cur % p[new_digits]));
                cur /= p[new_digits];
                cur_digits -= new_digits;
            }
        }
        res.push_back((int) cur);
        while (!res.empty() && !res.back())
            res.pop_back();
        return res;
    }
 
    typedef vector<long long> vll;
 
    static vll karatsubaMultiply(const vll &a, const vll &b) {
        int n = a.size();
        vll res(n + n);
        if (n <= 32) {
            for (int i = 0; i < n; i++)
                for (int j = 0; j < n; j++)
                    res[i + j] += a[i] * b[j];
            return res;
        }
 
        int k = n >> 1;
        vll a1(a.begin(), a.begin() + k);
        vll a2(a.begin() + k, a.end());
        vll b1(b.begin(), b.begin() + k);
        vll b2(b.begin() + k, b.end());
 
        vll a1b1 = karatsubaMultiply(a1, b1);
        vll a2b2 = karatsubaMultiply(a2, b2);
 
        for (int i = 0; i < k; i++)
            a2[i] += a1[i];
        for (int i = 0; i < k; i++)
            b2[i] += b1[i];
 
        vll r = karatsubaMultiply(a2, b2);
        for (int i = 0; i < (int) a1b1.size(); i++)
            r[i] -= a1b1[i];
        for (int i = 0; i < (int) a2b2.size(); i++)
            r[i] -= a2b2[i];
 
        for (int i = 0; i < (int) r.size(); i++)
            res[i + k] += r[i];
        for (int i = 0; i < (int) a1b1.size(); i++)
            res[i] += a1b1[i];
        for (int i = 0; i < (int) a2b2.size(); i++)
            res[i + n] += a2b2[i];
        return res;
    }
 
    bigint operator*(const bigint &v) const {
        vector<int> a6 = convert_base(this->a, base_digits, 6);
        vector<int> b6 = convert_base(v.a, base_digits, 6);
        vll a(a6.begin(), a6.end());
        vll b(b6.begin(), b6.end());
        while (a.size() < b.size())
            a.push_back(0);
        while (b.size() < a.size())
            b.push_back(0);
        while (a.size() & (a.size() - 1))
            a.push_back(0), b.push_back(0);
        vll c = karatsubaMultiply(a, b);
        bigint res;
        res.sign = sign * v.sign;
        for (int i = 0, carry = 0; i < (int) c.size(); i++) {
            long long cur = c[i] + carry;
            res.a.push_back((int) (cur % 1000000));
            carry = (int) (cur / 1000000);
        }
        res.a = convert_base(res.a, 6, base_digits);
        res.trim();
        return res;
    }
}ans;

mt19937 hdp(123123);
int rand(int l, int r){return l + ((hdp() % (r - l + 1)) + r - l + 1) % (r - l + 1);}

const int NM = 200 + 5;

vector<array<int, 2>> g[NM][NM];
map<array<int, 2>, int> mp;
int n, dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1};
string d = "NESW";

void addedge(int xa, int ya, int xb, int yb)
{
    g[xa][ya].push_back({xb, yb});
    g[xb][yb].push_back({xa, ya});
}

int dir(int x, int y, int nx, int ny)
{
    return mp[{nx - x, ny - y}];
}

void dfs(int x, int y, int px, int py, bigint cur, bigint mul)
{
    if (x == 0 && y == n - 1)
    {
        ans = cur;
        return;
    }
    sort(g[x][y].begin(), g[x][y].end(), [&](const auto& a, const auto& b){return dir(x, y, a[0], a[1]) < dir(x, y, b[0], b[1]);});
    int cnt = 0;
    for (int i = 0; i < g[x][y].size(); i++)
    {
        auto t = g[x][y][i];
        int st = max(1, (int)g[x][y].size() - 1);
        if (g[x][y].size() == 2 && x == n - 1 && y == 0)
            st = 2;
        if (make_pair(t[0], t[1]) != make_pair(px, py))
        {
            int k = 0;
            if (g[x][y].size() > 2 || (g[x][y].size() == 2 && x == n - 1 && y == 0))
                k = cnt++;
            dfs(t[0], t[1], x, y, cur + mul * k, mul * st);
        }
    }
}

void solve()
{
    for (int i = 0; i < 4; i++)
        mp[{dx[i], dy[i]}] = i;
    string _;
    cin >> _;
    if (_ == "view")
    {
        cin >> n;
        for (int i = 0; i <= 2 * n; i++)
            for (int j = 0; j <= 2 * n; j++)
            {
                char c;
                cin >> c;
                if (c == '#')
                    continue;
                if ((i & 1) && (j & 1 ^ 1) && (j > 0 && j < 2 * n))
                    addedge(i / 2, j / 2 - 1, i / 2, j / 2);
                if ((i & 1 ^ 1) && (j & 1) && (i > 0 && i < 2 * n))
                    addedge(i / 2 - 1, j / 2, i / 2, j / 2);
            }
        dfs(n - 1, 0, -1, -1, 0, 1);
        if (ans == 0)
            cout << 0;
        while (ans != 0)
        {
            cout << (ans % 2);
            ans /= 2;
        }
    }
    else
    {
        string s;
        cin >> s;
        reverse(s.begin(), s.end());
        for (char c : s)
            ans = ans * 2 + c - '0';
        cin >> n;
        int x = n - 1, y = 0, pr = -1;
        while (make_pair(x, y) != make_pair(0, n - 1))
        {
            vector<int> pos;
            for (int i = 0; i < 9; i++)
            {
                char c;
                cin >> c;
                if (c == '#')
                    continue;
                if (i == 1)
                    pos.push_back(0);
                if (i == 3)
                    pos.push_back(3);
                if (i == 5)
                    pos.push_back(1);
                if (i == 7)
                    pos.push_back(2);
            }
            sort(pos.begin(), pos.end());
            int X = 0;
            int t = 1;
            if (pos.size() > 2)
                t = max(1, (int)pos.size() - 1);
            if (pos.size() == 2 && x == n - 1 && y == 0)
                t = 2;
            X = ans % t;
            int cnt = 0;
            for (int k : pos)
                if ((pr ^ 2) != k)
                {
                    if (cnt == X)
                    {
                        X = k;
                        break;
                    }
                    cnt++;
                }
            cout << d[X] << endl;
            x += dx[X];
            y += dy[X];
            pr = X;
            ans /= t;
        }
    }
}

signed main()
{
    // if (fopen("in.txt", "r")) 
    // {
    //     freopen("in.txt", "r", stdin);
    //     freopen("out.txt", "w", stdout);
    // }
    // else if (fopen(name".inp", "r"))
    // {
    //     freopen(name".inp", "r", stdin);
    //     freopen(name".out", "w", stdout);
    // }
    // ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    int tc = 1; 
    // cin >> tc;
    while (tc--)
        solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
5
###########
#.#.......#
#.###.#####
#.#.....#.#
#.#.###.#.#
#...#.....#
###.#######
#.........#
###.#######
#.........#
###########

output:

0

input:

walk
0
5
###
#..
###
#.#
...
###
#.#
...
#.#
#.#
..#
#.#
###
#..
#.#
#.#
...
###
###
...
#.#
###
...
###

output:

E
N
N
N
E
N
E
E

result:

ok 8 steps

Test #2:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
5
###########
#.........#
#.###.###.#
#.#.#.#.#.#
###.#.#.#.#
#.#.#...#.#
#.#.#.#####
#.....#.#.#
#.#.#.#.#.#
#.#.#.....#
###########

output:

11

input:

walk
11
5
#.#
#.#
###
#.#
#..
#.#
#.#
...
#.#
#.#
..#
#.#
#.#
#..
#.#
#.#
#.#
#.#
###
...
#.#
###
...
###

output:

N
E
E
N
N
N
E
E

result:

ok 8 steps

Test #3:

score: 100
Accepted
time: 0ms
memory: 4736kb

input:

view
5
###########
#.....#...#
###.###.###
#...#.#...#
#.#.#.###.#
#.#...#...#
###.#.###.#
#.#.#.#...#
#.#.###.#.#
#.......#.#
###########

output:

11

input:

walk
11
5
#.#
#..
###
#.#
...
###
###
...
###
#.#
..#
###
###
#..
#.#
#.#
..#
#.#
#.#
..#
#.#
###
..#
#.#
#.#
#..
###
###
#..
#.#

output:

E
E
E
N
E
N
N
W
N
E

result:

ok 10 steps

Test #4:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
5
###########
#.........#
#.###.###.#
#...#...#.#
#.###.#####
#.#.....#.#
#.#.###.#.#
#.#.#...#.#
###.#.#.#.#
#...#.#...#
###########

output:

0

input:

walk
0
5
###
#..
###
#.#
..#
###
#.#
#.#
#.#
###
#..
#.#
#.#
...
###
#.#
#..
#.#
###
...
#.#
###
...
###

output:

E
N
N
E
N
N
E
E

result:

ok 8 steps

Test #5:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
5
###########
#.........#
#.#######.#
#.#.....#.#
###.###.#.#
#.....#...#
#.#########
#.#...#.#.#
#.#.#.#.#.#
#...#.....#
###########

output:

0

input:

walk
0
5
#.#
#..
###
#.#
#.#
#.#
###
#..
#.#
#.#
...
###
###
#..
#.#
###
...
###
###
..#
#.#
#.#
#..
###
#.#
..#
###
#.#
#.#
#.#

output:

N
N
E
N
E
E
S
E
N
N

result:

ok 10 steps

Test #6:

score: 100
Accepted
time: 0ms
memory: 4736kb

input:

view
5
###########
#.....#.#.#
###.###.#.#
#.#...#...#
#.#.###.###
#.#...#...#
#.###.#.###
#.........#
###.#.#.###
#...#.#...#
###########

output:

011001

input:

walk
011001
5
###
#..
###
#.#
..#
###
###
...
#.#
#.#
...
#.#
#.#
...
#.#
#.#
#..
#.#
#.#
#..
#.#
#.#
..#
###

output:

E
N
E
E
N
N
E
N

result:

ok 8 steps

Test #7:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
5
###########
#.....#.#.#
#.###.#.#.#
#...#.#.#.#
#.###.#.#.#
#...#.....#
#####.###.#
#.......#.#
#.###.#####
#.#.......#
###########

output:

1001

input:

walk
1001
5
#.#
#.#
###
###
#..
#.#
###
...
###
#.#
...
#.#
#.#
#..
#.#
#.#
...
###
#.#
..#
#.#
#.#
#.#
#.#

output:

N
E
E
N
E
E
N
N

result:

ok 8 steps

Test #8:

score: 100
Accepted
time: 0ms
memory: 4736kb

input:

view
7
###############
#...#.......#.#
#.###.#######.#
#.#.....#.#.#.#
#.#.###.#.#.#.#
#.....#.#...#.#
#####.###.###.#
#.#...#.#.....#
#.#.#.#.#.###.#
#...#.....#...#
#######.#.###.#
#.......#.#...#
###.###.#.#####
#...#...#.....#
###############

output:

00111

input:

walk
00111
7
###
#..
###
#.#
..#
###
###
...
#.#
###
...
###
#.#
..#
#.#
#.#
...
#.#
#.#
..#
#.#
#.#
#..
#.#
###
...
###
#.#
..#
#.#
#.#
#.#
#.#
#.#
#.#
#.#

output:

E
N
E
E
N
E
N
E
E
N
N
N

result:

ok 12 steps

Test #9:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
7
###############
#.....#.......#
#.#.#######.###
#.#.#.....#...#
###.#.#.#.#.###
#.#...#.#.#...#
#.#######.#.###
#.#.#.#...#...#
#.#.#.#.#.#.###
#.....#.#.....#
#.###.#.#.#.#.#
#...#...#.#.#.#
#.###.#.#####.#
#...#.#.....#.#
###############

output:

00111001

input:

walk
00111001
7
#.#
#..
###
#.#
#..
#.#
#.#
#..
#.#
#.#
...
###
#.#
..#
#.#
#.#
#..
#.#
#.#
..#
#.#
#.#
#.#
#.#
###
#..
#.#
#.#
..#
#.#
#.#
#..
#.#
#.#
...
#.#
#.#
#..
#.#
#.#
#..
#.#
#.#
#..
#.#
###
...
#.#

output:

N
N
E
E
S
E
N
N
E
S
E
N
N
N
N
E

result:

ok 16 steps

Test #10:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
10
#####################
#.....#.....#.......#
###.#.###.#.#.#.#####
#...#.#...#.#.#...#.#
###.#####.#####.###.#
#.....#.............#
###.###.#.###########
#.......#...#...#...#
#.#.###.#.###.#.###.#
#.#...#.#...#.#.#.#.#
###.###.###.#.#.#.#.#
#.....#.#.#...#.#...#
#.#######.#.###.###.#
#........

output:

0000111

input:

walk
0000111
10
#.#
#.#
###
###
#..
#.#
#.#
..#
#.#
###
#..
#.#
###
...
###
#.#
..#
###
###
..#
#.#
###
...
###
###
...
###
#.#
#..
#.#
###
#..
#.#
#.#
...
###
#.#
#..
#.#
#.#
...
#.#
###
...
###
#.#
..#
#.#
###
#..
#.#
#.#
...
#.#
###
...
###
###
...
###
#.#
...
###
#.#
#..
#.#
###
...
#.#
###
...
...

output:

N
E
N
E
E
N
W
W
W
N
E
N
N
E
E
N
E
E
E
E
N
N
E
E

result:

ok 24 steps

Test #11:

score: 100
Accepted
time: 0ms
memory: 4480kb

input:

view
10
#####################
#.#.......#.#...#...#
#.###.#####.#.###.###
#...#.....#.....#...#
###.#.#.#.#.#.#.#.#.#
#.....#.#.#.#.#.#.#.#
#####.#.#####.###.#.#
#...#.#.......#.#.#.#
###.#.#.#####.#.#.#.#
#.#...#...#.#.....#.#
#.#.###.###.###.#.###
#...#.#.......#.#.#.#
#####.#.###########.#
#........

output:

010111111

input:

walk
010111111
10
#.#
#.#
###
#.#
#.#
#.#
#.#
#.#
#.#
###
#..
#.#
###
...
#.#
#.#
...
#.#
#.#
...
#.#
#.#
#..
#.#
#.#
#..
#.#
#.#
#..
#.#
###
...
###
###
...
###
#.#
..#
#.#
#.#
#..
###
#.#
...
#.#
#.#
..#
#.#
#.#
#.#
#.#
#.#
#.#
#.#
#.#
#..
#.#
###
#..
#.#

output:

N
N
N
E
E
E
N
N
N
E
E
E
S
E
E
N
N
N
N
E

result:

ok 20 steps

Test #12:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
14
#############################
#.....#...........#.#...#.#.#
#####.###.#.###.###.###.#.#.#
#...#.....#...#.#...#...#.#.#
#.#.#.#.#.#####.#.#.###.#.#.#
#.#...#.#.#.#.#...#.#.....#.#
#.#########.#.#.#.###.#.#.#.#
#...#...#.#.#.#.#.#...#.#.#.#
#.#####.#.#.#.###########.#.#
#.............#.....#....

output:

00001001100010111

input:

walk
00001001100010111
14
#.#
#..
###
#.#
#.#
#.#
#.#
#..
#.#
#.#
#.#
#.#
#.#
#..
#.#
#.#
#.#
#.#
#.#
#..
#.#
#.#
#.#
#.#
#.#
#.#
#.#
#.#
#..
#.#
###
...
###
###
...
###
#.#
...
#.#
#.#
...
###
#.#
...
#.#
#.#
#.#
#.#
#.#
...
###
#.#
..#
###
###
#..
#.#
#.#
..#
#.#
#.#
#..
#.#
#.#
#..
#.#
#.#
...
##...

output:

N
N
N
N
N
N
N
N
N
E
E
E
E
E
S
S
E
N
E
S
S
S
E
E
E
N
N
N
N
E
E
E
N
N
N
N

result:

ok 36 steps

Test #13:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
14
#############################
#.#.....#.#.#...#...#.....#.#
#.#.#####.#.#.#.#.#.#.#####.#
#.......#.#.#.#...#.......#.#
###.#.###.#.#########.#.#.#.#
#.#.#.......#...#.#...#.#...#
#.#.#######.###.#.###.#####.#
#.........#.#.............#.#
#.#####.###.#.#####.#.###.###
#.#...#.#.....#.....#....

output:

00100011101010010110101

input:

walk
00100011101010010110101
14
###
#..
###
###
...
###
#.#
..#
###
###
...
#.#
#.#
..#
###
#.#
#..
#.#
#.#
#.#
#.#
###
...
#.#
#.#
#..
###
#.#
#..
#.#
#.#
#..
#.#
#.#
#..
#.#
#.#
...
#.#
#.#
...
###
#.#
#.#
#.#
###
...
#.#
###
...
###
#.#
...
###
#.#
#.#
#.#
#.#
...
#.#
###
...
#.#
#.#
#..
###
###
...

output:

E
E
N
E
N
N
N
W
N
N
N
N
E
N
N
W
W
N
N
E
S
E
E
E
S
S
E
N
E
E
E
E
N
N
E
E
S
E
N
N

result:

ok 40 steps

Test #14:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
21
###########################################
#.#.#.....#...#.#...#.#...#...#...#...#...#
#.#.#.#.###.###.###.#.###.#.#.#.###.###.#.#
#.....#.#...............#.#.#.#...#.#.#.#.#
#######.#############.#.#.#.#.#.#.#.#.#.###
#...#...#...#.....#...#...#.#...#.......#.#
#.#.#.#####.###.#####.#####....

output:

00110101000110001110100000011111

input:

walk
00110101000110001110100000011111
21
###
#..
###
#.#
...
###
#.#
...
#.#
###
...
###
###
...
###
#.#
...
#.#
#.#
#.#
#.#
#.#
#..
#.#
#.#
..#
#.#
#.#
#..
#.#
###
..#
#.#
#.#
#..
#.#
#.#
#..
###
###
...
###
#.#
...
###
#.#
#..
#.#
###
...
###
#.#
...
#.#
###
...
###
#.#
...
###
###
#..
#.#
#.#
..#...

output:

E
N
E
E
E
N
N
E
N
E
S
S
E
E
N
E
E
E
E
N
E
N
E
N
E
N
E
N
W
W
N
W
N
N
N
W
N
E
E
E
N
N
E
S
E
E
N
E
E
N
N
W
W
N
E
N
N
E

result:

ok 58 steps

Test #15:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
21
###########################################
#.#.#.#.......#...#.....#.......#...#.....#
#.#.#.#######.#.#######.#.#####.#.#####.###
#.#...#.#...#.#...........#.....#.#.......#
#.#.###.###.#.###.#.#####.#.#.###.###.#####
#.......#...#.#...#...#...#.#.#.#.#.#.....#
###.#####.#.#.#.#####.###.#....

output:

010011011111001011101000111111

input:

walk
010011011111001011101000111111
21
#.#
#..
###
#.#
#.#
#.#
#.#
#..
#.#
#.#
..#
###
#.#
#..
#.#
#.#
..#
#.#
#.#
#..
#.#
###
...
#.#
#.#
#..
###
###
...
#.#
###
...
###
###
...
###
#.#
...
#.#
#.#
..#
#.#
#.#
#..
#.#
###
...
###
#.#
...
###
###
#..
#.#
#.#
...
###
###
...
#.#
#.#
...
###
#.#
#..
#...

output:

N
N
E
N
N
N
E
S
E
E
E
E
E
N
E
E
N
E
E
E
N
N
N
E
N
E
E
N
E
N
N
W
W
S
W
N
N
N
N
E
E
N
E
E
E
E
N
W
N
E
N
E

result:

ok 52 steps

Test #16:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
33
###################################################################
#.....#.....#...#.......#.......#.#.........#...#.#...#.#.#.......#
#.#.#######.#.###.###.###.#####.#.###.#.#.#####.#.#.###.#.#.#.#####
#.#.........#...#...#.....#...#...#.#.#.#.#...........#.....#.....#
###.#######.###.####...

output:

0010110100000100100110101111000101100100110111101110001

input:

walk
0010110100000100100110101111000101100100110111101110001
33
###
#..
###
#.#
...
###
#.#
..#
#.#
#.#
...
#.#
#.#
..#
###
#.#
#..
#.#
#.#
..#
#.#
###
#..
#.#
###
...
###
#.#
...
###
#.#
..#
#.#
#.#
#..
#.#
#.#
#.#
#.#
#.#
..#
#.#
#.#
#..
###
#.#
#.#
#.#
###
...
#.#
#.#
...
#.#
###
#..
#.#
#.#
..#
...

output:

E
N
N
E
N
N
N
E
E
E
N
N
N
W
N
N
W
N
E
N
E
S
E
S
S
S
S
E
E
E
E
S
E
E
N
E
E
E
E
E
E
E
N
W
N
E
N
E
E
N
E
E
S
E
N
E
N
N
N
E
E
N
E
N
N
E
E
N
W
N
N
W
N
E
N
N
N
W
W
N
W
W
W
N
N
N
N
E
S
S
E
N
N
E
E
E
N
W
N
E
N
E
E
E

result:

ok 104 steps

Test #17:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
33
###################################################################
#...#...#.....#.#.......#...#.#.#...#...#.....#.#.........#.....#.#
###.###.###.###.#.#######.#.#.#.#.#.#.#####.#.#.#.#####.#.###.#.#.#
#.......#.....#.#...#.#...#.......#.#.#.....#...#...#.#.#.....#.#.#
###.###.###.###.#.##...

output:

0011011111110111011111111100001100111100000101101

input:

walk
0011011111110111011111111100001100111100000101101
33
#.#
#.#
###
#.#
#..
#.#
#.#
#..
#.#
###
#..
#.#
#.#
..#
###
#.#
#.#
#.#
###
#..
#.#
#.#
..#
###
###
#..
#.#
#.#
...
###
#.#
..#
#.#
#.#
..#
###
###
#..
#.#
#.#
#..
###
###
...
#.#
#.#
...
###
###
...
###
#.#
..#
#.#
#.#
#.#
#.#
#.#
...
#.#
#....

output:

N
N
N
E
N
N
E
N
E
E
S
W
S
E
E
E
E
S
S
E
S
E
N
N
N
E
N
N
E
N
E
N
W
W
N
N
N
W
N
W
N
N
E
E
E
N
N
W
N
N
N
N
E
S
S
E
E
E
E
E
N
W
N
E
E
E
E
N
W
W
N
E
N
N
N
N
E
N
E
N
E
S
E
N
E
S
E
E
N
E
N
N
W
N
W
N
E
E
E
E
S
E
E
N
E
S
S
E
N
N

result:

ok 110 steps

Test #18:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
74
#####################################################################################################################################################
#...#.......#.......#.......#...#.....#...............#.....#.#.#.....#.#.#...#.....#...#...#...#.....#.#.#.#.......#.....#.#.#...#.#...#........

output:

001000010101000111001110110011010010001100000000101101001000110110010111111001011010100011011001000000010000010000010100010011000011111111101

input:

walk
001000010101000111001110110011010010001100000000101101001000110110010111111001011010100011011001000000010000010000010100010011000011111111101
74
#.#
#.#
###
###
#..
#.#
###
...
#.#
#.#
..#
#.#
#.#
#..
#.#
###
...
###
###
...
###
###
...
###
#.#
..#
#.#
###
#..
#.#
#.#
...
#.#
###
..#
#.#
#.#
.....

output:

N
E
E
N
E
E
E
E
N
E
N
W
N
W
N
E
N
E
N
E
E
S
E
N
E
N
N
N
E
S
E
S
S
E
S
W
S
E
E
N
E
E
E
E
S
E
S
E
N
N
N
W
N
N
N
N
N
E
E
S
S
E
N
N
E
N
E
N
N
N
W
N
N
E
E
E
N
E
N
E
S
S
E
E
S
W
S
W
N
W
S
S
E
S
E
E
E
E
E
E
N
N
E
N
E
E
N
N
N
E
N
E
N
E
N
E
N
W
N
W
N
W
N
N
E
N
W
N
E
N
N
N
W
N
E
N
N
E
E
E
N
E
E
N
W
N
N
E
N
N
...

result:

ok 260 steps

Test #19:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
74
#####################################################################################################################################################
#.#...#.#...#.#.......#...#.....#.........#.#.....#.#.#.....#...........#.#.....#...#.#.......#.....#...#...#...#...#.....#.............#.#......

output:

000101110100011001001001010000101111101110101110010000010010101000110000011011100010011110100011101011110110100110110100110001111101100111110000111001000100110011001100010011101101101111000001001

input:

walk
000101110100011001001001010000101111101110101110010000010010101000110000011011100010011110100011101011110110100110110100110001111101100111110000111001000100110011001100010011101101101111000001001
74
###
#..
###
###
...
###
#.#
..#
###
###
...
#.#
#.#
..#
#.#
###
...
#.#
###
...
###
###
...
###
...

output:

E
E
N
E
N
E
E
E
E
N
N
N
W
W
W
W
N
E
N
N
E
N
N
W
N
W
N
N
W
N
N
N
E
N
W
N
N
N
N
E
N
N
W
N
N
N
N
E
N
W
N
N
E
N
N
N
W
N
E
N
N
E
E
N
E
E
S
S
S
E
E
S
E
E
E
N
E
N
N
E
N
E
S
S
E
E
E
N
E
S
E
S
E
E
E
N
N
N
E
S
E
N
N
E
E
E
S
S
S
S
S
E
E
E
S
S
W
S
E
E
E
S
W
S
S
E
S
S
S
W
S
W
S
E
S
S
E
S
E
N
N
E
E
N
E
E
E
S
S
S
...

result:

ok 330 steps

Test #20:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
71
###############################################################################################################################################
#.....#...#...#.....#.........#.#.#...#.#.......#...#...#.....#...#...........#.....#...#...#.....#...#.#.....#.#...#.......#.#...#.#...#...#.#
#.##...

output:

0001000010110011000001011101110110101110101000110011010111010111011010101110001101000010010010111101111110111110010110101101000001101101110111110001001111101111011000100100001000000010101

input:

walk
0001000010110011000001011101110110101110101000110011010111010111011010101110001101000010010010111101111110111110010110101101000001101101110111110001001111101111011000100100001000000010101
71
###
#..
###
#.#
...
###
#.#
#.#
#.#
#.#
..#
#.#
###
..#
#.#
#.#
#..
###
#.#
#..
#.#
#.#
#.#
#.#
#.#
#.#
...

output:

E
N
N
N
W
N
N
N
N
E
E
E
E
N
N
N
W
N
W
W
N
W
N
E
E
E
E
N
E
S
E
E
S
S
S
S
E
S
E
E
S
E
E
S
E
N
N
W
N
N
E
E
S
E
N
N
N
N
N
N
E
N
E
N
E
N
N
N
N
E
E
E
E
N
N
N
N
N
N
E
N
N
W
N
N
N
E
N
E
S
E
S
E
N
N
N
N
E
E
E
S
S
S
E
N
E
N
E
E
E
S
S
S
E
E
N
E
S
E
S
S
E
S
E
E
N
E
S
E
E
S
W
S
E
S
E
S
E
E
S
S
E
E
E
E
E
E
E
N
N
...

result:

ok 322 steps

Test #21:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
71
###############################################################################################################################################
#...........#...#...#.#.....#...#...#.#.#.#.....#.#.#.......#.........#...#.....#...#.....#...#...#.........#...#...#.#.#.........#.#.....#.#.#
#.##...

output:

0011011000101001100010010011010011011111000110100101111110011111000110110111010001011110100111010100101011110000000011101000010111101001111001101101010011

input:

walk
0011011000101001100010010011010011011111000110100101111110011111000110110111010001011110100111010100101011110000000011101000010111101001111001101101010011
71
###
#..
###
#.#
...
###
###
..#
#.#
#.#
#..
###
#.#
#..
#.#
#.#
#..
#.#
#.#
...
###
###
...
###
###
...
#.#
#.#
..#
###
#.#
#..
#.#
###
....

output:

E
N
W
N
N
E
E
E
E
N
E
S
E
E
E
N
E
N
N
N
E
N
W
N
W
W
N
N
W
N
N
W
N
N
N
E
N
W
N
E
N
N
W
W
W
S
W
S
S
W
N
N
N
N
N
N
N
E
E
E
N
N
N
E
E
N
N
N
N
E
S
E
N
N
N
W
N
W
W
N
N
N
E
S
E
E
N
N
E
N
E
E
E
E
S
S
E
S
E
E
E
E
N
E
S
S
E
E
S
W
S
S
E
E
E
N
W
N
N
E
S
E
N
E
N
E
E
E
N
E
E
E
S
E
E
S
W
W
S
E
E
E
S
E
E
S
S
W
S
W
...

result:

ok 266 steps

Test #22:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
107
#######################################################################################################################################################################################################################
#.....#.#.#...#.#.#.#.#.......#...#.#.....#.......#...#.#.#.......#.....#.....

output:

10001001111000011010001101011001110011101011000011111001100111000001101010001001011111010110101110001010110101110100110101010110110010000010100101111011110101011110001100111101001000000110001010010101001111101001110101010001

input:

walk
10001001111000011010001101011001110011101011000011111001100111000001101010001001011111010110101110001010110101110100110101010110110010000010100101111011110101011110001100111101001000000110001010010101001111101001110101010001
107
###
#..
###
###
...
###
#.#
..#
###
###
...
#.#
#.#
...
###
#.#
#....

output:

E
E
N
W
N
N
E
N
E
N
W
N
N
N
N
N
E
E
E
N
W
N
N
N
W
N
N
W
W
N
W
N
N
E
E
E
N
N
N
N
E
E
E
E
N
N
N
W
N
N
E
E
E
N
E
E
E
N
E
N
N
E
S
E
E
S
S
W
S
E
S
W
S
E
E
E
E
E
E
E
S
S
E
N
E
E
N
N
E
N
E
N
N
E
E
E
N
E
N
E
E
E
S
S
S
S
E
E
E
E
E
N
E
E
N
N
N
N
W
N
W
S
W
W
N
N
N
E
S
E
N
N
N
N
E
N
N
E
N
N
W
W
W
W
W
N
N
N
W
W
...

result:

ok 390 steps

Test #23:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
107
#######################################################################################################################################################################################################################
#.....#.....#.#.#.....#.....#...........#.....#.....#.....#.#.#.........#.....

output:

000101000011100000111110111101100011010110100101001010010010110100010011000001000111101100001101010110001001010101110001101100111110100001110000111111100011101000011110011100110111011111100001001100111101000001000111010101100010101110100011000000011011

input:

walk
000101000011100000111110111101100011010110100101001010010010110100010011000001000111101100001101010110001001010101110001101100111110100001110000111111100011101000011110011100110111011111100001001100111101000001000111010101100010101110100011000000011011
107
#.#
#.#
###
###
#..
#.#
#.#
..#
###
#....

output:

N
E
N
N
E
N
E
S
S
S
S
E
N
E
E
N
N
N
N
N
E
E
E
N
E
E
S
E
E
N
N
E
E
S
E
E
E
N
W
N
E
N
W
N
N
N
N
N
E
E
N
N
W
N
N
E
N
E
E
E
E
E
N
N
N
N
N
E
N
E
E
S
E
E
E
S
S
S
W
S
S
E
E
N
E
E
S
S
E
N
E
N
N
E
N
E
E
E
S
S
E
E
E
E
E
E
N
N
E
S
S
S
E
N
E
E
E
N
E
S
S
E
E
E
S
S
E
S
S
S
S
S
S
S
E
S
E
E
N
N
N
E
E
N
E
E
N
N
W
W
...

result:

ok 434 steps

Test #24:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
144
#################################################################################################################################################################################################################################################################################################
#...

output:

100100010111000100001100001101110111101101000101010001101010110111000011110100100011110110110000100110001101000010100100001011010101001101100000011111001011110110001000001011100110011010101111000100111011000001010000001100000011001100010000101000010001110010010011110101000011011100101100111011101001...

input:

walk
1001000101110001000011000011011101111011010001010100011010101101110000111101001000111101101100001001100011010000101001000010110101010011011000000111110010111101100010000010111001100110101011110001001110110000010100000011000000110011000100001010000100011100100100111101010000110111001011001110111...

output:

E
E
N
E
N
E
S
S
E
E
N
E
E
N
E
E
E
E
S
S
E
E
E
E
N
W
W
N
N
E
E
N
E
N
E
S
E
N
E
N
N
E
N
N
W
W
N
E
N
E
N
E
N
E
E
N
N
E
E
E
N
E
N
W
N
N
W
N
N
E
E
N
N
N
E
N
E
E
N
W
N
W
W
N
W
N
N
E
E
E
E
N
W
W
N
N
N
N
E
N
W
N
E
N
W
N
N
N
W
W
N
W
N
N
W
S
S
W
S
W
W
S
S
W
W
W
N
N
E
N
W
N
W
N
W
S
W
W
N
N
W
N
N
E
N
E
N
W
N
N
...

result:

ok 610 steps

Test #25:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
144
#################################################################################################################################################################################################################################################################################################
#...

output:

010001101000000101110001101011010011011101010110011100110110110010011000101111111001110101111110001111001010011000011111100001101111111000110000010011011100101110110110111010010110010100100000010100111010100111000100000001111000101101110001111110000100111100110010111101101000011010000100110011000110...

input:

walk
0100011010000001011100011010110100110111010101100111001101101100100110001011111110011101011111100011110010100110000111111000011011111110001100000100110111001011101101101110100101100101001000000101001110101001110001000000011110001011011100011111100001001111001100101111011010000110100001001100110...

output:

N
E
N
E
S
E
S
E
N
E
N
N
E
N
N
N
E
N
N
E
E
E
N
N
E
S
S
E
E
E
E
S
S
E
E
S
E
N
E
S
E
E
E
N
N
E
E
E
E
S
E
S
E
S
S
S
S
E
N
N
E
N
N
N
N
W
W
N
N
E
S
E
N
N
W
W
N
W
W
N
W
N
N
E
N
N
N
N
N
E
E
N
E
N
E
N
N
W
W
W
W
W
N
N
N
W
N
W
N
W
W
W
S
W
W
S
W
N
W
N
E
E
N
W
N
E
E
N
W
N
E
E
E
E
N
W
N
W
N
E
E
N
N
E
E
S
S
S
E
E
...

result:

ok 610 steps

Test #26:

score: 100
Accepted
time: 3ms
memory: 4480kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101000000000010010110101000010111010111010001101011101010111000000001000001000111111111000100011100001111100100010010010111011010010110011001111111101100001011111010111001010010110000110000111001000010101111000000010010100111111101110111011001111110000101010000111011001010111001111010101011010111011...

input:

walk
1010000000000100101101010000101110101110100011010111010101110000000010000010001111111110001000111000011111001000100100101110110100101100110011111111011000010111110101110010100101100001100001110010000101011110000000100101001111111011101110110011111100001010100001110110010101110011110101010110101...

output:

E
E
N
W
N
N
N
E
E
N
E
N
N
W
N
N
E
E
N
E
E
N
N
N
W
N
E
E
N
N
E
E
E
N
W
N
E
N
E
N
N
E
S
E
N
E
N
N
E
E
N
E
S
E
S
E
S
S
E
S
S
E
E
N
E
E
E
E
S
E
E
E
E
E
S
E
N
E
S
S
S
E
N
E
S
E
E
E
E
E
N
W
N
W
N
N
E
N
E
N
W
N
N
N
E
N
E
N
E
E
N
E
E
N
E
S
E
E
E
N
E
E
S
E
S
E
S
E
E
S
E
S
S
E
N
N
E
E
N
N
W
W
W
N
W
W
N
E
N
N
...

result:

ok 1172 steps

Test #27:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110010000101101011011100011100110011101011010100011101000111100100101111111100001011010111100011000100100001010100100011110101101111110111101100000100010111000110110001101000100010111001101111010110101110101111001000111110001110100011100110010110010111010001001011001111010001011001101010101111011101...

input:

walk
1100100001011010110111000111001100111010110101000111010001111001001011111111000010110101111000110001001000010101001000111101011011111101111011000001000101110001101100011010001000101110011011110101101011101011110010001111100011101000111001100101100101110100010010110011110100010110011010101011110...

output:

E
E
E
N
E
E
E
S
E
E
E
N
N
N
E
N
N
N
N
E
E
N
E
E
N
N
W
W
N
E
N
W
W
N
W
W
N
E
N
E
E
N
N
E
E
N
W
N
N
N
N
E
E
E
E
N
N
E
E
N
E
E
N
N
N
N
W
N
E
N
N
E
N
E
N
W
N
N
N
E
E
S
E
S
S
S
S
S
S
E
E
N
E
S
E
N
E
S
S
E
E
N
N
N
N
N
W
N
N
N
N
E
E
E
E
E
S
S
S
S
S
E
S
E
S
S
E
S
W
S
E
E
S
S
S
E
S
S
E
N
E
S
S
E
E
N
E
E
N
E
...

result:

ok 888 steps

Test #28:

score: 100
Accepted
time: 3ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

010111000101110000001000011111010111001100010110000100010001101101110101000101011000100000100000001001011111100001101111011101110001000011001000010001101100110100111010001111010100010001011110001100101010111111100010110001100110011010001100000110101010011110111101010011010000101001000110001011100000...

input:

walk
0101110001011100000010000111110101110011000101100001000100011011011101010001010110001000001000000010010111111000011011110111011100010000110010000100011011001101001110100011110101000100010111100011001010101111111000101100011001100110100011000001101010100111101111010100110100001010010001100010111...

output:

N
N
E
E
N
N
N
E
N
E
E
E
E
S
E
N
E
S
E
N
E
S
S
E
E
N
E
N
N
E
N
N
N
W
N
N
W
N
W
N
W
W
N
W
N
N
W
N
E
N
E
E
N
E
E
E
N
E
N
N
E
S
S
E
S
S
W
S
E
E
S
S
S
E
N
E
N
E
E
N
N
E
N
E
N
E
S
S
E
E
S
E
E
E
N
W
N
E
E
E
E
E
N
N
N
N
E
E
N
N
N
W
W
S
W
W
W
N
N
W
S
S
S
W
W
N
W
W
N
N
W
N
N
E
N
E
N
E
N
E
N
N
E
E
S
E
S
E
N
E
...

result:

ok 844 steps

Test #29:

score: 100
Accepted
time: 3ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001000011001100110000100101110101100001100101000101101110010111000111110111100111001100011100110000011101000001011011000011000000110000100000010100000101010000110111110000001000000001000100111101111000000100110101111111110010001000000110001001101111111101100000111010011001101011010110101001001000111...

input:

walk
0010000110011001100001001011101011000011001010001011011100101110001111101111001110011000111001100000111010000010110110000110000001100001000000101000001010100001101111100000010000000010001001111011110000001001101011111111100100010000001100010011011111111011000001110100110011010110101101010010010...

output:

N
E
N
N
N
W
N
N
E
N
E
E
N
E
N
E
S
E
E
S
S
S
E
S
E
E
E
N
N
E
E
N
E
N
E
E
E
E
E
N
N
N
W
W
N
N
N
W
W
N
E
N
W
W
N
N
W
N
N
N
E
E
E
E
S
S
E
E
N
E
N
E
E
E
E
E
E
E
S
E
S
S
E
S
E
E
S
S
E
E
E
S
S
S
E
S
S
E
E
N
E
N
E
S
E
N
E
S
S
S
S
E
S
E
E
S
E
S
S
S
E
E
E
S
E
E
E
N
E
N
E
S
E
E
S
E
N
E
N
E
N
W
N
N
W
N
N
N
N
W
...

result:

ok 1198 steps

Test #30:

score: 100
Accepted
time: 7ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100100110001001111111101010001000110101000011111011011010000011011010100000101100010001000101011101010101011011101010000000011011101111011001001011111111011011001011101001110011000011000101111000000001011011001001110110100101001010100010011001001111101101110001011101100001000010100010001001011111100...

input:

walk
1001001100010011111111010100010001101010000111110110110100000110110101000001011000100010001010111010101010110111010100000000110111011110110010010111111110110110010111010011100110000110001011110000000010110110010011101101001010010101000100110010011111011011100010111011000010000101000100010010111...

output:

E
N
E
N
N
N
E
E
E
N
E
N
N
E
S
E
E
E
E
E
S
W
S
E
E
S
E
E
E
S
E
N
E
N
N
N
E
E
S
E
N
N
W
N
N
N
N
N
N
E
N
N
E
E
E
N
E
S
S
E
S
E
E
N
E
S
E
E
E
S
S
S
E
S
S
S
E
E
E
E
N
E
N
E
N
E
S
E
S
S
E
S
E
E
N
N
N
N
N
E
E
N
E
E
N
E
N
N
E
E
N
W
W
N
N
W
W
W
W
N
W
N
E
E
N
N
E
E
N
N
E
N
E
E
E
E
N
E
S
E
E
E
E
E
S
E
S
S
E
E
...

result:

ok 1394 steps

Test #31:

score: 100
Accepted
time: 5ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000001111111111111011000001100001101100100010011101100000011100100001101100010011010011001010000111101110100011110111011011101000011001111111111101010001111100000111111111111111111001010110010110010110111000100110010101010000011110010101111010000011010110110001001110000101101001000001000001101111011...

input:

walk
0000011111111111110110000011000011011001000100111011000000111001000011011000100110100110010100001111011101000111101110110111010000110011111111111010100011111000001111111111111111110010101100101100101101110001001100101010100000111100101011110100000110101101100010011100001011010010000010000011011...

output:

E
E
E
N
E
E
S
E
N
N
E
N
W
W
W
N
W
N
E
E
S
E
E
N
E
E
N
E
E
N
N
E
S
E
E
E
S
E
E
N
N
N
E
S
E
E
N
N
N
N
W
N
E
E
E
S
E
E
N
N
E
S
E
N
E
E
S
E
S
E
N
E
N
N
E
S
E
N
N
E
E
E
N
W
N
E
N
E
N
N
N
N
E
E
S
S
E
S
W
S
E
E
S
S
E
S
W
S
S
S
W
S
E
S
W
W
W
W
S
W
S
W
W
S
W
S
S
S
E
S
S
E
E
N
N
N
E
N
E
N
E
E
E
N
E
E
E
E
N
E
...

result:

ok 918 steps

Test #32:

score: 100
Accepted
time: 4ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

010100001001111110111010001001010100101100000001110001001111101000100110010101100100011110100000000110100000111001101001011000011011011101100100000100011101010000100101011100111011001110000010000011000011100101000101010001000101101111001001000010111111011001100101101110111110110010011100110010000111...

input:

walk
0101000010011111101110100010010101001011000000011100010011111010001001100101011001000111101000000001101000001110011010010110000110110111011001000001000111010100001001010111001110110011100000100000110000111001010001010100010001011011110010010000101111110110011001011011101111101100100111001100100...

output:

E
N
N
N
N
E
E
N
N
W
N
E
N
N
E
E
N
E
E
N
E
N
N
E
N
N
E
N
E
N
E
E
N
N
N
W
W
N
N
N
N
N
N
N
N
W
N
N
W
N
N
E
N
E
E
N
N
N
W
N
N
N
N
E
E
E
N
E
N
E
N
E
N
E
E
E
N
E
E
S
E
N
N
E
E
S
E
E
S
E
S
E
E
S
E
S
E
E
S
E
E
N
E
N
N
E
E
E
N
E
N
W
N
N
E
E
E
N
N
W
N
E
E
N
W
N
N
E
N
E
N
E
E
N
W
N
E
N
N
W
W
N
N
N
N
N
N
W
N
N
...

result:

ok 872 steps

Test #33:

score: 100
Accepted
time: 2ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

010001111001000000100111100101010111101110001100100001011110011001100111001011100011111000010001011111110101011000011001010100110111000000000010101100111010000011000001001100101001100001011110001011110111001000001001101010101000100110011001101011110111111010010001101110011100000011110101101111000011...

input:

walk
0100011110010000001001111001010101111011100011001000010111100110011001110010111000111110000100010111111101010110000110010101001101110000000000101011001110100000110000010011001010011000010111100010111101110010000010011010101010001001100110011010111101111110100100011011100111000000111101011011110...

output:

N
N
E
E
E
N
N
E
N
E
E
N
E
E
E
E
S
E
E
E
N
N
E
S
E
N
N
N
E
N
N
W
N
N
W
N
W
N
N
N
E
N
N
E
S
E
E
E
E
E
N
E
E
N
N
E
S
E
S
E
N
N
E
N
N
E
E
E
E
E
N
E
E
N
N
W
N
N
N
N
E
E
N
E
S
E
E
E
E
N
N
E
S
E
E
E
E
E
N
N
E
N
N
E
N
N
E
N
E
E
N
E
E
N
N
N
N
N
N
N
E
E
E
N
E
E
N
E
S
S
S
S
W
S
S
E
E
E
S
W
W
S
S
S
S
W
W
S
S
W
...

result:

ok 1094 steps

Test #34:

score: 100
Accepted
time: 3ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100100000000010001110101111101000001111111111101011110101111010000111110100101101001111000101100011011110010010101001011110111000110001010101111101011100100001001100011010101011011110010001001001100111111110110111100111000101110110000010111101101010110011001100011101110101010001010010101100110101111...

input:

walk
1001000000000100011101011111010000011111111111010111101011110100001111101001011010011110001011000110111100100101010010111101110001100010101011111010111001000010011000110101010110111100100010010011001111111101101111001110001011101100000101111011010101100110011000111011101010100010100101011001101...

output:

E
E
N
N
E
N
N
N
N
N
E
E
S
W
S
E
E
N
N
E
E
E
E
S
E
E
E
E
N
W
N
N
W
W
N
E
N
E
E
N
N
W
N
W
W
N
N
W
N
E
N
N
N
W
W
W
N
N
N
E
N
N
N
E
N
E
N
W
N
N
N
N
W
S
W
S
S
W
N
W
W
N
W
N
N
N
N
E
N
N
E
N
N
N
W
N
N
N
N
E
E
E
N
N
E
N
N
E
E
N
N
N
N
E
N
N
N
E
E
E
E
E
S
E
N
E
E
E
E
N
E
N
W
N
N
N
E
S
E
N
E
N
N
N
N
N
W
N
E
E
...

result:

ok 1068 steps

Test #35:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110000100010111101000010001010001000111100101001111100101001001110110101111101011001001011110111100101101111101001100010110110011001011101011111100110011110110110000110011110101110110100010101011001010010100011110000111111011111001101101111110000000011100001011000110010111101110111100100111001001000...

input:

walk
1100001000101111010000100010100010001111001010011111001010010011101101011111010110010010111101111001011011111010011000101101100110010111010111111001100111101101100001100111101011101101000101010110010100101000111100001111110111110011011011111100000000111000010110001100101111011101111001001110010...

output:

E
N
E
S
E
N
N
E
N
N
N
E
N
N
E
S
E
N
E
E
N
N
N
N
N
W
N
W
W
N
N
N
E
N
E
E
E
N
E
S
E
N
E
S
S
S
E
N
E
E
E
S
S
E
N
E
S
E
E
E
E
E
N
N
N
N
W
S
S
W
W
N
E
N
W
N
N
E
N
N
E
E
E
N
N
E
E
N
E
N
E
N
E
E
S
E
S
E
E
N
N
E
E
E
N
N
N
N
W
N
E
N
E
E
N
W
W
N
W
N
E
E
N
E
N
E
N
E
N
N
E
N
E
N
E
N
E
N
E
N
W
W
N
E
N
N
N
N
W
S
...

result:

ok 956 steps

Test #36:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001000010010110011100001011000010011110101010110011101010100100000110110001111101000010000010011011101000010011010000111100111101000111111010000011001111011001110011000111010010010101000000111011000010110101101001111110011101000100000111001111010101100010001101000010010001101110011000010010101001111...

input:

walk
0010000100101100111000010110000100111101010101100111010101001000001101100011111010000100000100110111010000100110100001111001111010001111110100000110011110110011100110001110100100101010000001110110000101101011010011111100111010001000001110011110101011000100011010000100100011011100110000100101010...

output:

N
N
N
E
N
W
N
E
E
E
S
E
N
N
E
N
E
E
N
E
S
E
E
E
N
N
N
W
N
N
N
E
N
N
W
N
W
N
N
W
N
N
W
W
N
W
N
W
N
W
N
N
W
W
N
N
N
N
N
E
N
N
N
E
N
N
E
E
S
E
E
N
N
N
N
N
E
N
N
E
E
E
E
N
W
N
N
W
N
N
N
N
N
E
N
N
N
E
E
E
N
N
E
S
E
E
E
E
E
N
N
E
E
N
E
S
S
E
E
E
E
S
E
E
E
E
E
N
N
E
E
S
S
E
E
E
N
E
E
E
E
S
E
S
S
W
S
S
S
S
...

result:

ok 818 steps

Test #37:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100111000110001001010000101000100001100000100011010100011011011110100110101010010000100101101100110011100011000110011000100011000000001111001000111111011110100001011110011101001011011000001101010101111010000111010100100011111110110011010110100111011110001001001010001111101101101000111011111100010001...

input:

walk
1001110001100010010100001010001000011000001000110101000110110111101001101010100100001001011011001100111000110001100110001000110000000011110010001111110111101000010111100111010010110110000011010101011110100001110101001000111111101100110101101001110111100010010010100011111011011010001110111111000...

output:

N
E
E
N
E
E
E
N
N
E
S
E
N
N
E
S
E
E
E
N
N
E
E
E
E
N
E
E
E
E
N
E
S
E
E
S
S
S
E
N
E
S
E
S
E
N
E
N
N
N
E
E
E
N
N
E
N
N
N
E
N
W
N
N
N
N
W
W
N
N
N
N
W
W
W
W
N
N
N
N
N
W
N
W
W
W
W
N
E
N
W
N
E
N
W
N
E
N
N
N
N
W
N
N
W
W
N
E
N
N
W
W
W
W
W
N
E
E
E
N
W
W
W
W
N
N
N
E
N
W
W
N
E
N
W
N
N
N
E
S
E
N
E
S
S
E
E
S
S
E
...

result:

ok 942 steps

Test #38:

score: 100
Accepted
time: 4ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

011001111010000110010111011101011001010011100111101101001111000001101011010101101011110100001001111111001111100101111110000011101000010010010011100011001011000111101110010000011100100011010100010101010000110011100010000101110001010111010101111010000011001100100000100111001100110100001101110100101001...

input:

walk
0110011110100001100101110111010110010100111001111011010011110000011010110101011010111101000010011111110011111001011111100000111010000100100100111000110010110001111011100100000111001000110101000101010100001100111000100001011100010101110101011110100000110011001000001001110011001101000011011101001...

output:

E
E
N
E
N
E
E
S
E
E
N
E
E
S
W
S
E
E
E
E
E
E
E
N
E
N
N
E
N
E
N
E
E
S
E
E
E
N
N
N
W
N
W
N
E
N
E
E
S
E
N
N
E
S
E
E
N
N
E
N
E
N
E
N
N
N
E
E
N
N
N
W
N
N
E
N
W
N
N
N
W
S
W
W
S
W
W
W
W
W
N
E
N
E
S
E
E
N
N
N
W
N
E
E
N
E
E
E
N
N
W
W
N
W
N
N
N
N
N
E
N
N
W
N
W
S
W
W
W
W
N
N
E
N
E
N
N
W
W
N
E
N
N
N
N
N
E
E
S
E
...

result:

ok 1230 steps

Test #39:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001010011010011010110100110111100111110100000101100111001000001011101110000000110101100101001111000010100001011100111010110011001011111111011001000001100101100100010000111011001111010000110110111011000010110101101000000100111111111101001011100111000001010101010110110110001110100011110010100100101001...

input:

walk
0010100110100110101101001101111001111101000001011001110010000010111011100000001101011001010011110000101000010111001110101100110010111111110110010000011001011001000100001110110011110100001101101110110000101101011010000001001111111111010010111001110000010101010101101101100011101000111100101001001...

output:

N
E
N
E
N
W
N
W
N
N
N
N
E
N
E
E
S
E
E
N
N
N
E
E
S
S
S
S
S
S
S
E
S
E
E
S
W
S
E
S
E
N
E
N
E
N
N
N
N
E
E
N
E
S
E
E
N
N
N
N
W
W
W
W
W
W
W
W
N
N
E
N
E
E
N
E
S
E
E
N
N
E
N
N
N
N
W
N
W
W
W
S
W
N
W
W
W
N
E
N
W
N
E
E
E
E
E
N
N
E
N
E
S
S
E
S
E
S
E
E
E
E
E
S
E
S
E
E
S
E
E
S
S
S
W
W
S
E
S
E
N
E
N
E
N
W
N
E
N
E
...

result:

ok 994 steps

Test #40:

score: 100
Accepted
time: 2ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

010001010100110110110101010111101101111101010111111100100000111010100000011101011101101110101001110101000100010000001111111111000001001111000010110010100101100001010100111011000110001110011110010110011010000011000111110010001101011110110100001010110001101110001100011101011010101000010110011001101010...

input:

walk
0100010101001101101101010101111011011111010101111111001000001110101000000111010111011011101010011101010001000100000011111111110000010011110000101100101001011000010101001110110001100011100111100101100110100000110001111100100011010111101101000010101100011011100011000111010110101010000101100110011...

output:

E
N
E
E
E
N
N
N
N
W
W
N
E
N
E
N
W
N
W
W
N
W
N
N
E
E
N
E
N
E
N
N
E
S
S
S
E
S
S
S
E
E
E
N
N
N
W
N
E
N
E
S
E
S
E
S
S
E
E
E
E
S
E
S
E
E
N
E
N
E
E
E
S
E
N
N
N
N
W
N
E
E
N
N
N
E
S
E
E
N
E
S
E
S
E
E
E
E
E
N
E
N
N
E
N
N
W
W
W
N
W
N
N
N
E
N
E
E
E
E
E
N
N
E
E
E
N
E
E
E
S
S
E
N
N
E
E
S
S
E
E
N
E
E
E
S
E
N
E
E
...

result:

ok 842 steps

Test #41:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001110100001000001001110100011001100001010101011011010101110100100110111000110111000111100110100110011111100000111111101011111110011110010111000000111001101101011000101100110111111011010111000111100011001110111111111000001101110110011000011110000110001011010001100111111001000101100001000010010101001...

input:

walk
0011101000010000010011101000110011000010101010110110101011101001001101110001101110001111001101001100111111000001111111010111111100111100101110000001110011011010110001011001101111110110101110001111000110011101111111110000011011101100110000111100001100010110100011001111110010001011000010000100101...

output:

E
E
N
N
N
E
N
N
E
S
S
E
S
E
E
N
W
N
N
E
N
N
W
N
N
N
W
N
E
N
E
E
S
S
E
S
S
E
E
N
E
E
N
E
E
E
E
N
N
N
E
N
N
E
S
E
S
E
S
E
E
S
S
E
S
S
E
E
N
E
N
E
S
E
E
E
E
E
N
E
N
N
E
E
S
E
E
S
W
W
W
S
S
S
E
E
S
E
E
S
E
N
N
N
N
W
N
E
E
S
E
E
E
S
S
S
S
E
S
E
E
E
S
W
S
S
E
S
E
N
N
E
E
S
E
N
N
E
E
N
N
E
E
N
N
N
E
E
E
E
...

result:

ok 784 steps

Test #42:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110000110100100000110001111001111000111000100111100101011011100000100101001110011100011110010101110010110000001101101100010100101100011100010110110101001011100010010000111011010101011110101100101001010000101011001110111100100010110110011111101100111000101010100000100000111011011010111111010011100011...

input:

walk
1100001101001000001100011110011110001110001001111001010110111000001001010011100111000111100101011100101100000011011011000101001011000111000101101101010010111000100100001110110101010111101011001010010100001010110011101111001000101101100111111011001110001010101000001000001110110110101111110100111...

output:

E
E
E
N
E
N
N
N
E
N
N
N
E
N
W
N
N
W
W
N
N
N
N
E
E
N
N
E
E
E
N
W
N
E
N
E
N
N
E
N
E
N
E
E
N
E
N
W
W
N
W
N
N
N
N
W
N
W
S
S
W
N
W
W
N
W
W
N
W
W
W
N
N
N
N
E
E
N
E
S
E
E
N
E
E
E
N
N
E
N
N
E
N
N
N
N
W
W
W
N
N
E
N
W
W
N
N
N
N
W
W
W
N
N
W
N
N
E
N
W
N
N
N
N
E
E
N
W
N
N
N
N
N
N
W
N
N
E
S
E
E
S
E
N
E
S
S
S
W
S
...

result:

ok 850 steps

Test #43:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110000110110011010101010000000100011010001011000001010100000100001000011000011111111110010011001100110011001011010111001010001001111111011101100101001010111011010100010101110001101001111001100101110100000100000101100010001001011001101100111110010000110111101011001011100000100111001011001010000110101...

input:

walk
1100001101100110101010100000001000110100010110000010101000001000010000110000111111111100100110011001100110010110101110010100010011111110111011001010010101110110101000101011100011010011110011001011101000001000001011000100010010110011011001111100100001101111010110010111000001001110010110010100001...

output:

E
E
N
N
E
N
N
E
N
E
N
N
W
N
N
E
E
N
E
N
E
E
E
N
W
N
W
N
W
N
E
N
N
E
E
E
E
S
E
E
S
E
E
E
N
E
S
S
E
N
N
E
N
N
E
E
E
E
E
N
N
E
N
N
N
E
E
E
S
E
S
S
E
S
S
E
N
E
E
N
N
E
N
N
N
N
N
N
E
E
E
E
E
S
E
S
E
N
N
N
E
N
N
N
N
N
E
E
S
S
E
N
N
E
E
E
E
N
N
N
N
N
N
E
E
S
S
S
S
E
E
S
S
E
N
E
N
N
E
N
E
N
N
E
S
S
E
S
E
E
...

result:

ok 914 steps

Test #44:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100001100011111000000010011110101110111011110100110000010110101100001111111101110110100100010011010100000001100101010000000011110000010010010011110110001000010011110001001100000111011001111011100110101010011011010100110011001101110010100100011101100111100110001010110011101000101111000111110100011010...

input:

walk
1000011000111110000000100111101011101110111101001100000101101011000011111111011101101001000100110101000000011001010100000000111100000100100100111101100010000100111100010011000001110110011110111001101010100110110101001100110011011100101001000111011001111001100010101100111010001011110001111101000...

output:

E
N
E
S
E
E
N
E
E
S
E
E
N
N
W
W
N
N
E
N
W
W
N
W
W
W
N
W
N
N
E
N
N
N
N
E
N
N
N
W
N
N
E
N
E
S
E
S
E
E
S
E
E
S
E
E
S
E
N
E
S
E
S
E
N
N
N
N
W
N
N
W
S
W
W
N
E
N
N
N
N
N
W
N
N
N
E
N
E
N
E
E
E
S
S
E
N
E
N
N
N
N
N
E
N
N
E
E
E
E
E
E
N
E
E
S
S
E
S
E
E
S
W
S
E
S
S
E
N
E
E
E
E
S
E
E
S
W
S
W
W
S
E
S
E
E
E
N
N
E
...

result:

ok 858 steps

Test #45:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000000011001110101110010100110011100010010110001100001001100011010011000101111101111101110000111111100101111010000101000100111011010101111000010011001101000000010100100010110111111010010100011000000010100000001100000110010011101001011000011001011011000110100100010010100011000011000101111001011011111...

input:

walk
0000000110011101011100101001100111000100101100011000010011000110100110001011111011111011100001111111001011110100001010001001110110101011110000100110011010000000101001000101101111110100101000110000000101000000011000001100100111010010110000110010110110001101001000100101000110000110001011110010110...

output:

N
E
E
N
W
N
E
E
N
W
W
N
N
N
E
E
S
E
E
N
N
E
E
N
W
N
E
N
E
S
E
E
E
S
E
E
N
N
E
S
E
E
E
S
E
E
N
N
E
N
E
N
N
E
E
N
W
N
W
N
W
W
S
W
N
W
W
N
N
W
N
N
N
E
E
N
E
E
E
E
N
W
N
W
W
W
W
N
W
N
N
E
E
E
N
W
W
N
E
N
W
N
W
N
W
N
W
W
N
E
N
N
E
E
E
N
N
E
N
W
N
N
N
W
N
N
E
E
E
E
E
N
E
S
E
S
E
E
E
N
N
N
E
N
W
W
N
N
W
N
...

result:

ok 1122 steps

Test #46:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

011110000010001001110011111101111100010110101110100011010011110000011000101101101000101110111111100011010111111101011111111010110000001010011010100110110110001111100110000101100100110011101001000110010101101010000010001110101000110000011100010010100010101111001100100111011111100000101111001001001010...

input:

walk
0111100000100010011100111111011111000101101011101000110100111100000110001011011010001011101111111000110101111111010111111110101100000010100110101001101101100011111001100001011001001100111010010001100101011010100000100011101010001100000111000100101000101011110011001001110111111000001011110010010...

output:

N
N
N
E
N
W
N
E
N
N
E
E
S
E
E
N
E
S
E
E
E
S
E
E
S
E
N
E
E
N
E
E
E
E
N
N
N
N
N
W
W
N
N
W
N
N
E
N
N
N
N
N
W
W
N
W
S
W
W
W
S
W
W
N
N
N
N
N
E
N
N
N
E
N
E
N
N
E
N
W
W
W
N
E
N
N
N
N
W
S
W
N
W
W
W
W
W
S
W
S
W
W
N
N
N
N
N
E
N
N
E
N
N
E
N
N
W
N
W
N
N
N
W
N
N
E
E
E
N
N
N
W
N
E
E
N
N
W
W
N
W
N
E
E
E
N
N
N
E
E
...

result:

ok 950 steps

Test #47:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

111001011110100111000011110110000110011111110110000001010011011111000101100001000101100101000011001100111100000011010110010001110110000011000001011011111100100100111110110010111111111101100100101110011011000011011010111000101000000110100000010010111001001000000110011000001001011011010011110010001001...

input:

walk
1110010111101001110000111101100001100111111101100000010100110111110001011000010001011001010000110011001111000000110101100100011101100000110000010110111111001001001111101100101111111111011001001011100110110000110110101110001010000001101000000100101110010010000001100110000010010110110100111100100...

output:

N
E
S
E
E
N
N
N
N
N
E
E
E
E
N
N
W
W
N
N
N
W
N
N
N
N
N
N
N
E
N
E
E
E
E
N
E
E
E
N
E
N
N
E
N
E
S
S
E
S
E
E
S
S
S
W
S
E
E
N
E
E
N
E
E
E
E
N
W
N
N
N
E
E
N
E
E
E
E
S
E
N
N
E
N
E
E
S
S
S
S
E
E
S
W
S
E
E
E
E
S
E
N
E
E
S
E
N
E
N
E
N
N
E
N
N
N
E
E
E
E
E
N
N
E
E
E
N
N
W
N
E
E
S
S
S
S
E
S
S
S
E
S
S
E
N
E
E
E
N
...

result:

ok 884 steps

Test #48:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100010010011001000001100110110110010100011110010111011000110101100011101100111001110100101101011010100011100010011001011001010110101010001100111100100001011000011111101111010111011000010000001001111011011001011011000101010000010101010011010000001111111111001000000101110101100101111011000101001100001...

input:

walk
1000100100110010000011001101101100101000111100101110110001101011000111011001110011101001011010110101000111000100110010110010101101010100011001111001000010110000111111011110101110110000100000010011110110110010110110001010100000101010100110100000011111111110010000001011101011001011110110001010011...

output:

E
N
W
N
N
N
N
N
E
E
S
E
E
N
E
E
S
E
N
E
N
W
W
N
N
N
N
W
W
S
W
N
N
N
E
E
N
E
N
N
E
E
N
N
N
N
E
S
E
S
E
S
S
S
W
S
E
E
E
S
S
E
E
E
E
S
E
E
S
E
S
E
E
E
N
E
E
N
N
W
N
N
E
N
E
E
E
N
N
E
E
N
E
N
W
N
E
N
N
W
W
S
W
N
N
N
E
N
E
E
N
E
E
S
S
E
N
N
N
N
E
E
N
E
N
E
N
N
N
E
N
E
E
E
E
N
N
E
N
N
E
N
W
N
N
W
N
W
W
N
...

result:

ok 758 steps

Test #49:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000000100010110100101100110000010100000001000000110111010111100011110111101011010010100101000010110110001001001110010110110000001001011001001010010010000000010101100000010101101000010000100100010100110001100010011001001100011100100000100101000011111011000111000010101011111011010111101001001010100101...

input:

walk
0000001000101101001011001100000101000000010000001101110101111000111101111010110100101001010000101101100010010011100101101100000010010110010010100100100000000101011000000101011010000100001001000101001100011000100110010011000111001000001001010000111110110001110000101010111110110101111010010010101...

output:

N
E
N
N
E
N
W
N
W
N
E
E
E
N
E
N
E
E
N
N
E
S
E
E
S
S
S
E
N
N
E
E
S
E
S
E
N
E
E
E
N
E
E
E
N
E
N
E
N
N
E
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
E
E
S
E
S
E
E
S
W
S
S
E
E
E
N
E
S
E
S
S
W
S
E
E
E
E
S
E
S
S
S
E
S
E
N
E
E
N
E
S
S
E
E
E
N
N
E
E
S
S
E
E
E
E
E
S
E
N
E
N
E
N
N
N
E
N
N
N
N
N
E
E
E
N
N
N
E
N
N
E
N
N
E
...

result:

ok 832 steps

Test #50:

score: 100
Accepted
time: 4ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101001000010001101100001000000100010010101001111101000111011110101000010010100100011001111100110011101100101000000110001000010101111000111010001010100101000000100110110111011110001000010101100101100101011101001011100110100110011001010100000000100011010001011011100101100001101011001100001000101001101...

input:

walk
1010010000100011011000010000001000100101010011111010001110111101010000100101001000110011111001100111011001010000001100010000101011110001110100010101001010000001001101101110111100010000101011001011001010111010010111001101001100110010101000000001000110100010110111001011000011010110011000010001010...

output:

N
N
E
N
E
E
E
S
E
E
E
S
E
E
E
N
E
E
N
W
N
E
N
W
N
E
E
E
E
E
N
W
W
W
W
W
W
W
W
W
W
W
N
N
E
N
N
E
N
E
E
N
N
N
W
W
N
N
E
S
E
N
E
N
N
N
N
E
E
E
S
S
S
E
N
E
E
E
E
S
E
S
E
E
E
E
E
E
N
N
N
N
N
N
E
N
W
N
N
W
N
N
N
W
N
N
E
N
N
E
E
E
E
E
N
N
E
N
E
S
E
E
E
N
E
E
N
W
W
N
W
N
E
E
N
N
W
N
W
W
N
W
W
W
W
W
W
N
N
N
...

result:

ok 1098 steps

Test #51:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101000000001000101010010010001110110110000100101011100110011000010010100011100001000100111010101101011110010000010011010100100101011100111101000010011011010011100011011101010011011010011100001000000000100101110111110010100011100101011101001010010110101000111010111110010110111101110000100110101001010...

input:

walk
1010000000010001010100100100011101101100001001010111001100110000100101000111000010001001110101011010111100100000100110101001001010111001111010000100110110100111000110111010100110110100111000010000000001001011101111100101000111001010111010010100101101010001110101111100101101111011100001001101010...

output:

E
N
N
E
E
S
S
E
N
E
S
E
E
N
E
N
N
N
N
E
N
N
W
S
W
W
W
W
N
N
E
E
N
E
E
N
W
W
W
N
W
W
N
N
E
N
N
N
W
N
W
N
N
W
N
N
N
N
E
N
E
S
S
E
E
N
E
E
N
E
S
S
E
S
W
S
E
E
S
S
E
N
E
N
N
E
E
E
E
S
E
E
E
S
E
E
N
N
W
N
N
N
N
W
W
W
N
W
N
W
N
N
N
N
E
E
E
E
E
N
W
N
E
N
N
N
E
N
E
N
N
N
N
W
W
N
W
N
W
W
S
S
W
W
S
W
W
W
W
W
...

result:

ok 1060 steps

Test #52:

score: 100
Accepted
time: 2ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101010110000011111111000101111001110011110100010001110001010101000110011101101011001010010011010000000100110101011101101110000100110010000110000010101110010100110110011111101010111001010101010011000000000101010110000010010010000100100111010111000010110111010001101011000101111010100100110001100111010...

input:

walk
1010101100000111111110001011110011100111101000100011100010101010001100111011010110010100100110100000001001101010111011011100001001100100001100000101011100101001101100111111010101110010101010100110000000001010101100000100100100001001001110101110000101101110100011010110001011110101001001100011001...

output:

N
N
N
E
S
E
N
E
E
N
E
E
N
N
W
N
W
S
W
N
W
N
N
E
N
N
W
W
N
N
N
N
E
N
E
N
N
N
N
N
W
N
N
N
E
N
E
E
E
E
N
E
S
E
N
E
S
E
E
E
N
W
W
N
N
E
E
N
N
E
E
N
N
E
E
S
E
S
S
S
E
E
E
N
N
N
W
N
N
E
E
N
E
N
E
E
E
S
E
E
N
E
S
S
S
E
E
N
E
S
S
S
E
E
S
S
E
E
E
N
N
N
E
E
N
N
E
N
N
E
S
S
S
S
S
S
S
E
E
E
N
E
N
N
N
E
E
N
N
W
...

result:

ok 1044 steps

Test #53:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000000100110011001001111010100000010110111000011001001111001110100000011001000001011101101001111111000100111001111001100000011001100110001111000010011100101100000010000100000000001101100010111110001110101100101001101000000001111111101101111010011000111100101010111101001101110010000011000110101011111...

input:

walk
0000001001100110010011110101000000101101110000110010011110011101000000110010000010111011010011111110001001110011110011000000110011001100011110000100111001011000000100001000000000011011000101111100011101011001010011010000000011111111011011110100110001111001010101111010011011100100000110001101010...

output:

N
E
N
E
E
N
E
E
E
N
N
N
E
E
E
N
W
N
E
E
S
S
S
S
E
E
E
E
E
E
N
E
E
N
N
N
W
N
W
N
E
N
E
E
N
E
S
E
S
S
E
E
E
N
N
N
E
N
N
E
N
N
N
W
W
W
W
N
E
N
E
E
N
E
N
E
E
S
E
N
N
N
W
N
W
N
W
W
S
W
W
N
W
N
N
W
W
N
W
N
N
E
E
N
N
N
N
N
N
N
N
N
E
E
N
N
E
E
S
S
E
S
E
S
E
S
E
S
E
E
E
S
E
N
E
E
N
N
N
N
N
N
N
E
N
E
E
S
S
S
...

result:

ok 952 steps

Test #54:

score: 100
Accepted
time: 6ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110000001001101010000001011110111111010101101001111010110001110101011101101010101100111110011111010110011101101110110010000011110111110101101010111111011011010111100101011011001010010010000011000001100011110100110110111100000110000110000000111000010101101011011111001010100100101001101100111011011101...

input:

walk
1100000010011010100000010111101111110101011010011110101100011101010111011010101011001111100111110101100111011011101100100000111101111101011010101111110110110101111001010110110010100100100000110000011000111101001101101111000001100001100000001110000101011010110111110010101001001010011011001110110...

output:

E
E
E
E
E
E
E
N
E
N
E
E
E
N
N
N
W
W
W
S
W
W
N
N
W
W
N
E
E
E
N
E
N
N
N
N
N
W
N
N
N
N
N
W
W
S
W
W
S
W
S
W
N
N
N
N
N
N
N
E
E
N
N
E
N
N
N
E
N
E
N
N
N
N
N
E
N
N
E
N
E
N
N
W
N
N
N
E
N
E
E
N
E
E
N
N
N
E
E
N
N
N
E
N
W
N
N
N
N
N
E
S
S
E
E
S
S
E
E
S
E
S
S
S
S
E
E
E
S
E
E
S
E
N
N
N
W
N
N
N
W
N
E
N
N
N
N
E
E
E
...

result:

ok 1298 steps

Test #55:

score: 100
Accepted
time: 3ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101011000001111001010101011001010001001010010001111100110011010100000100100100100100000001011000110111000100001110010000101111111001010110011011100001111100101110001011101100001101010001110011111011011101110111110110101011001011111111011011001011010001001011111100001100111101111000001011111010100100...

input:

walk
1010110000011110010101010110010100010010100100011111001100110101000001001001001001000000010110001101110001000011100100001011111110010101100110111000011111001011100010111011000011010100011100111110110111011101111101101010110010111111110110110010110100010010111111000011001111011110000010111110101...

output:

E
N
N
N
N
E
N
N
E
E
N
N
E
E
E
N
E
N
N
E
N
N
N
N
E
S
E
E
E
N
E
S
S
S
E
E
S
S
W
W
S
E
S
E
S
E
E
E
S
E
E
N
N
N
N
E
E
E
E
E
N
N
N
N
E
N
E
N
W
W
W
N
W
W
W
W
N
N
W
W
W
N
N
N
N
N
N
E
E
E
E
N
W
N
N
W
W
W
W
W
N
W
W
N
N
N
N
W
N
E
E
N
N
W
W
W
N
N
N
N
N
N
N
N
N
N
N
E
E
N
N
E
N
N
E
N
E
N
E
E
N
E
N
N
W
N
W
W
N
N
...

result:

ok 836 steps

Test #56:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101110000001110001010011111110111000101111111001001010101101111100111100111110010010011101100011000001111010001011111111010110001101001000101000110010100010000010110111000111001001011110000000101111111101001011000101101010001001111010010101101101101010011100010011101010110011001110111010010001110101...

input:

walk
1011100000011100010100111111101110001011111110010010101011011111001111001111100100100111011000110000011110100010111111110101100011010010001010001100101000100000101101110001110010010111100000001011111111010010110001011010100010011110100101011011011010100111000100111010101100110011101110100100011...

output:

E
N
W
N
N
E
E
N
W
W
N
E
E
E
E
E
E
E
N
E
S
E
S
E
E
E
E
N
N
N
E
E
N
W
N
W
N
N
E
E
E
E
S
S
S
S
E
E
E
N
E
N
W
N
E
N
W
N
N
W
S
W
N
N
N
E
E
N
E
S
E
E
E
N
W
W
N
N
E
N
E
E
S
E
N
N
E
N
N
E
E
N
W
N
N
E
E
N
W
N
N
W
N
N
N
N
W
W
W
W
W
W
N
N
N
W
N
N
N
E
N
N
N
E
N
E
N
N
W
S
W
N
N
W
W
N
W
N
N
N
E
N
E
E
E
N
N
N
E
S
...

result:

ok 936 steps

Test #57:

score: 100
Accepted
time: 2ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001010111010011101101001011011101010001111011100100010000100001000110111111101000100010011110010110011100001110110010000110011111000001111111110000010000010110100011110001011000011010001001100001011110101101000110101100111101011100000011001000000100101000010011010101101010110000100111001101000110100...

input:

walk
0010101110100111011010010110111010100011110111001000100001000010001101111111010001000100111100101100111000011101100100001100111110000011111111100000100000101101000111100010110000110100010011000010111101011010001101011001111010111000000110010000001001010000100110101011010101100001001110011010001...

output:

E
N
E
N
N
W
N
W
N
E
E
E
E
S
E
S
S
E
N
E
E
S
E
N
N
N
E
N
E
N
N
E
E
S
E
E
E
N
E
S
S
E
E
E
E
N
W
W
N
N
N
N
W
N
N
N
N
N
W
N
W
N
N
W
N
N
E
N
E
E
E
E
S
S
E
E
E
E
S
W
S
E
S
E
E
E
E
E
E
N
N
E
S
S
S
E
E
N
E
N
E
S
E
S
E
S
W
S
S
E
E
N
N
E
N
E
S
E
E
N
N
N
E
S
S
E
S
S
E
E
S
S
E
E
N
E
E
E
N
N
E
N
E
E
N
E
N
N
E
N
...

result:

ok 1028 steps

Test #58:

score: 100
Accepted
time: 5ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101110110110111011001000010110100010001010010110111000110100000011100100010101111000011111111001010001101111111101101101101100000011000000111001111010010001001000010100101100100110110000011010100101010000001010110000100100100100110000101010101011000100101111100100101000101010001110100100001011000111...

input:

walk
1011101101101110110010000101101000100010100101101110001101000000111001000101011110000111111110010100011011111111011011011011000000110000001110011110100100010010000101001011001001101100000110101001010100000010101100001001001001001100001010101010110001001011111001001010001010100011101001000010110...

output:

E
N
E
S
E
E
N
E
E
S
E
E
N
E
S
E
N
E
E
N
W
N
W
N
N
E
E
N
E
E
E
S
E
N
E
E
E
S
E
N
N
N
W
N
N
E
N
N
W
W
N
N
N
W
W
W
N
W
N
N
E
E
E
N
N
N
W
N
W
W
W
W
N
N
N
N
E
N
N
W
S
W
W
S
W
W
W
W
N
W
N
N
W
N
N
N
E
N
W
W
N
N
N
N
N
N
N
N
E
E
E
N
N
E
E
N
E
N
N
E
E
E
E
E
E
E
E
N
E
E
E
E
E
E
N
E
E
S
E
S
E
S
E
E
E
N
N
E
S
E
...

result:

ok 1246 steps

Test #59:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000100110111101010011010010110000010011011101110011111000111000100001101110101110101011001000001010100010110011011001011011010010010011010001011110011010100010001110111001110101011100100100000011011001111100011010100000101101011111110010001001101100101100110010101010011110000100100110100000010010011...

input:

walk
0001001101111010100110100101100000100110111011100111110001110001000011011101011101010110010000010101000101100110110010110110100100100110100010111100110101000100011101110011101010111001001000000110110011111000110101000001011010111111100100010011011001011001100101010100111100001001001101000000100...

output:

E
N
N
E
N
N
N
W
N
N
E
N
E
E
N
N
E
E
S
E
E
N
W
N
N
E
E
N
N
W
N
E
E
N
N
N
N
E
N
N
N
N
N
W
N
E
E
S
E
S
E
E
S
E
S
E
S
E
E
S
E
E
S
S
E
N
E
S
E
E
E
S
E
E
S
E
S
E
E
N
E
N
E
E
E
E
N
N
W
W
N
N
E
S
E
N
E
E
E
E
N
E
N
E
N
E
N
E
E
N
N
W
N
N
W
N
N
N
W
W
W
N
N
W
N
W
N
N
N
N
N
N
N
E
E
N
E
E
E
E
E
E
S
E
E
S
E
E
S
E
...

result:

ok 676 steps

Test #60:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100100111101010110100010011101111110010110110100001000001000100001000010101000001011111001011100000010010010101101000100011100000100101001110010011110001100010011111010100010100010001100001011010000110010010001101101001001011100111000111100000010101010100101010011100011100100111100110101110100011100...

input:

walk
1001001111010101101000100111011111100101101101000010000010001000010000101010000010111110010111000000100100101011010001000111000001001010011100100111100011000100111110101000101000100011000010110100001100100100011011010010010111001110001111000000101010101001010100111000111001001111001101011101000...

output:

N
E
N
E
E
N
N
E
N
N
W
N
E
N
W
W
W
N
N
N
N
N
E
N
N
N
N
N
E
E
E
S
S
S
S
E
S
E
E
E
N
E
E
E
E
E
E
E
N
E
N
N
E
E
S
E
N
E
N
E
E
E
N
E
E
N
N
E
E
N
N
N
E
N
W
N
N
N
E
E
S
E
E
N
N
N
W
N
W
W
W
W
N
N
N
E
N
E
N
N
N
N
E
E
N
E
E
S
E
N
E
S
E
E
N
E
E
N
E
E
E
N
E
E
N
E
E
S
E
E
E
E
E
E
N
E
N
W
W
N
W
N
W
W
N
W
W
W
N
N
...

result:

ok 740 steps

Test #61:

score: 100
Accepted
time: 3ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

110100100111001111001011011110011001111010000000101011000110001110001001001110010000101001001100111111010100000101011001011101001001101001010011011100111001111100010111111110100110001011100111011110101000000101111000001011110110010010110111100001001011001010010011110111110001010000111101000111001000...

input:

walk
1101001001110011110010110111100110011110100000001010110001100011100010010011100100001010010011001111110101000001010110010111010010011010010100110111001110011111000101111111101001100010111001110111101010000001011110000010111101100100101101111000010010110010100100111101111100010100001111010001110...

output:

N
E
S
E
E
N
E
S
E
N
E
N
E
E
E
E
S
S
E
E
N
N
N
N
E
E
N
E
E
E
E
E
N
N
E
N
W
W
N
N
N
E
E
N
N
E
E
E
E
N
E
S
E
N
N
N
E
N
N
E
N
N
E
S
S
E
E
S
S
E
S
E
N
E
N
E
S
E
E
E
E
S
E
N
E
E
E
E
N
W
N
W
N
W
W
W
W
N
W
W
W
N
N
N
N
W
W
N
E
N
N
E
E
N
E
S
E
S
E
E
N
E
E
S
E
E
N
N
E
E
N
W
N
W
W
N
N
W
N
N
W
N
N
W
N
N
N
E
N
N
...

result:

ok 854 steps

Test #62:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000000000100000001111000101101101000111110100110000010001111001100000001010100100001101010111110100001000000000001001110001101111101111001010100111100010011101101100011011111011100000110111000111101111110001100000111011111100000101010010001101101000011000101010101000100010011011000001101111000110010...

input:

walk
0000000001000000011110001011011010001111101001100000100011110011000000010101001000011010101111101000010000000000010011100011011111011110010101001111000100111011011000110111110111000001101110001111011111100011000001110111111000001010100100011011010000110001010101010001000100110110000011011110001...

output:

E
E
N
N
E
N
N
W
N
E
E
N
N
N
W
N
N
E
E
N
N
N
E
E
E
N
N
E
N
E
N
W
N
N
E
E
N
E
S
S
E
E
N
N
N
E
N
E
N
E
N
N
E
E
S
E
S
E
E
N
E
N
E
E
N
W
N
W
N
N
E
E
E
E
S
E
E
N
N
E
S
E
S
E
S
S
W
S
S
E
E
S
E
N
E
N
E
N
E
N
E
E
N
N
E
E
N
N
N
N
N
E
N
N
E
E
E
E
N
E
S
E
S
E
N
N
N
E
E
E
N
N
N
N
N
E
E
N
N
N
N
E
E
S
S
E
E
E
N
N
...

result:

ok 702 steps

Test #63:

score: 100
Accepted
time: 3ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

001010000101000110000110111111010110001111000011011100001000110001110100000111011110011100000010011010111011110010100001110000001110111011111001001000000000101011110010000001110001100101111010000101000111000100100110111011001111110011111100001011000100000000000101001000100111010110011001000110111011...

input:

walk
0010100001010001100001101111110101100011110000110111000010001100011101000001110111100111000000100110101110111100101000011100000011101110111110010010000000001010111100100000011100011001011110100001010001110001001001101110110011111100111111000010110001000000000001010010001001110101100110010001101...

output:

E
N
N
E
E
N
E
E
S
E
S
E
E
E
E
E
N
E
N
W
N
W
N
N
E
N
E
E
E
S
E
S
E
N
E
E
N
W
N
E
E
N
E
S
S
S
E
E
N
N
N
E
N
E
S
E
N
N
E
S
E
E
N
E
N
E
S
S
S
E
E
S
E
S
S
E
N
E
E
N
W
N
N
W
W
N
N
E
E
N
W
N
E
E
N
E
E
N
E
E
E
N
N
N
E
E
N
E
E
N
E
S
E
E
S
S
S
E
N
N
E
N
N
W
W
N
E
N
N
E
E
N
N
N
N
N
E
N
W
W
W
N
W
W
N
E
N
N
N
W
...

result:

ok 988 steps

Test #64:

score: 100
Accepted
time: 5ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100100010110100101100001100101000111011101000011111011110011011001101100001000001011000111011110010001010111011001000100101000100110111010010101011100010000010010101111001001111000101110010101100011110011100001101011111001111111000010100001110001000101111101111011110111111011101010011011010001001101...

input:

walk
1001000101101001011000011001010001110111010000111110111100110110011011000010000010110001110111100100010101110110010001001010001001101110100101010111000100000100101011110010011110001011100101011000111100111000011010111110011111110000101000011100010001011111011110111101111110111010100110110100010...

output:

E
E
N
N
N
N
N
N
E
E
N
N
N
N
N
E
E
N
N
W
N
N
E
N
W
W
N
N
E
N
N
E
N
N
N
W
N
N
W
N
N
E
S
E
E
E
N
E
N
E
E
E
E
E
N
E
N
N
W
N
N
E
N
E
E
N
E
N
E
N
E
S
E
N
N
N
W
N
W
N
N
W
N
N
E
N
W
N
E
N
N
E
E
N
N
W
S
W
W
W
W
N
W
N
E
E
N
N
N
E
E
N
E
E
S
E
E
E
S
S
E
E
E
E
N
E
E
N
W
N
E
N
E
E
E
S
S
E
E
N
E
E
N
N
E
E
N
N
W
N
...

result:

ok 802 steps

Test #65:

score: 100
Accepted
time: 2ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100000010100000001110001100001011001111100111001101101100101000011011111010001100101011101011011101110100011100110100101011111100001110111001010011111101111100001100000000101011000011010000101101001001000110001011001101110011111011000000011011101000101001110000100000010101101011010001100111111111010...

input:

walk
1000000101000000011100011000010110011111001110011011011001010000110111110100011001010111010110111011101000111001101001010111111000011101110010100111111011111000011000000001010110000110100001011010010010001100010110011011100111110110000000110111010001010011100001000000101011010110100011001111111...

output:

E
E
N
N
N
N
N
E
N
N
E
N
E
N
W
W
W
N
W
N
E
E
N
N
E
E
E
E
N
E
N
N
N
W
W
W
W
W
N
N
N
E
E
E
N
N
E
N
E
N
N
E
N
E
S
E
S
E
E
S
E
E
E
S
W
S
E
E
E
S
W
S
S
S
E
S
E
S
E
S
E
E
E
N
N
N
W
N
E
E
N
N
E
N
W
N
W
N
N
N
E
E
E
E
E
N
E
N
N
E
E
N
N
E
E
N
N
E
E
S
E
N
N
N
N
E
N
N
W
W
W
N
E
N
N
N
W
N
N
N
N
W
N
N
N
N
N
E
E
E
...

result:

ok 766 steps

Test #66:

score: 100
Accepted
time: 3ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100010000111001101000111111101100101000111001111000110110001101000101111001110101111110100000011011000001011001000101001101101111101011100110110101001101111000101111001100101010000111010100101000001001010010111110000000010101001100001100111010000010011000010001111001111111011001001001000101111000101...

input:

walk
1000100001110011010001111111011001010001110011110001101100011010001011110011101011111101000000110110000010110010001010011011011111010111001101101010011011110001011110011001010100001110101001010000010010100101111100000000101010011000011001110100000100110000100011110011111110110010010010001011110...

output:

E
N
N
E
E
N
E
N
N
N
W
W
W
N
N
E
E
N
E
E
N
E
E
E
N
E
E
E
N
N
E
E
N
N
E
S
E
S
E
N
N
E
N
N
N
E
S
E
E
S
W
W
S
S
W
S
S
E
N
E
E
S
E
E
S
E
E
S
E
E
N
E
N
E
N
N
N
N
E
N
E
S
E
E
N
N
N
W
N
E
E
N
E
S
S
E
S
E
S
E
E
N
E
S
E
E
E
E
E
N
E
S
S
S
S
S
S
S
W
S
S
S
S
S
E
E
E
E
E
E
E
E
N
N
E
E
E
E
N
N
N
N
W
N
E
E
N
E
N
E
...

result:

ok 938 steps

Test #67:

score: 100
Accepted
time: 4ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000100010010101101100100010100001100000100100000111101001011101010101110011111010010010011011001011011011101001010011100000110110010101010101110000001011101010001110110110000011011110011001001011010111100101110100111001010110111000000110110001000100010101101111101110110011111101010010010110111111110...

input:

walk
0001000100101011011001000101000011000001001000001111010010111010101011100111110100100100110110010110110111010010100111000001101100101010101011100000010111010100011101101100000110111100110010010110101111001011101001110010101101110000001101100010001000101011011111011101100111111010100100101101111...

output:

N
E
N
N
W
N
N
E
N
E
N
N
N
N
N
N
E
N
W
N
N
E
E
N
E
N
E
S
E
E
S
E
E
N
E
N
E
S
E
S
S
E
E
S
E
E
N
E
N
E
S
E
S
S
W
S
S
S
E
E
S
S
E
E
S
E
S
E
E
N
N
N
N
E
S
E
N
E
E
E
E
S
E
S
E
E
E
E
E
N
N
N
E
N
E
E
S
S
S
E
S
E
N
E
N
E
S
E
N
N
E
E
N
N
E
E
E
N
N
N
W
N
E
N
W
N
E
N
N
N
E
S
E
N
N
E
N
E
S
S
E
N
E
E
E
E
E
E
N
W
...

result:

ok 1044 steps

Test #68:

score: 100
Accepted
time: 2ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000111100100001011000011110001000101000101111110001001000111010100111101100010011110110100000000110011010110101101100011011110011111011110110011100101010101111111001000010110101010110010011010000010111000110011101010100100110100111000001011010011011101101101011110110101011010011100101111101111111101...

input:

walk
0001111001000010110000111100010001010001011111100010010001110101001111011000100111101101000000001100110101101011011000110111100111110111101100111001010101011111110010000101101010101100100110100000101110001100111010101001001101001110000010110100110111011011010111101101010110100111001011111011111...

output:

E
N
E
N
N
W
N
E
E
N
N
N
E
N
N
E
E
N
W
N
N
N
N
E
E
E
E
E
S
E
E
N
E
E
N
E
N
N
E
S
S
E
E
S
S
E
E
S
S
E
E
S
S
E
N
E
N
E
E
E
E
N
E
E
S
S
E
N
E
E
E
E
E
S
E
E
E
E
N
E
E
E
E
N
N
N
N
N
N
N
W
W
N
N
E
E
E
S
E
E
E
S
S
E
N
N
E
S
S
E
E
E
E
E
E
N
N
N
N
W
W
N
E
N
E
E
N
N
W
N
E
E
S
S
E
E
E
S
S
E
E
E
S
E
S
E
E
E
N
W
...

result:

ok 698 steps

Test #69:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101100110101100100011101100010110101111001000110010011101011010010000010111110110001011100011111110000011100000100110011110110110011010111001001110101001001101011100101001001101101001100010001010010111011001010101111110110101011000000110101001101010101100101100101110011011110001111100101011010000011...

input:

walk
1011001101011001000111011000101101011110010001100100111010110100100000101111101100010111000111111100000111000001001100111101101100110101110010011101010010011010111001010010011011010011000100010100101110110010101011111101101010110000001101010011010101011001011001011100110111100011111001010110100...

output:

N
E
E
S
E
E
E
E
N
W
N
W
N
N
N
W
N
E
N
N
N
W
N
W
W
N
N
N
N
N
N
E
E
E
E
E
E
E
E
S
S
E
N
N
N
N
N
E
E
N
N
N
W
W
W
W
N
W
N
N
N
W
W
N
N
N
E
N
E
E
E
S
E
S
E
E
N
N
N
N
E
E
E
N
N
E
N
N
W
N
W
N
N
N
E
E
S
E
S
S
E
E
N
E
E
N
N
E
S
E
E
S
E
S
S
E
N
N
E
N
N
N
E
E
N
N
N
E
N
E
N
E
S
S
S
S
E
E
N
E
N
E
E
E
E
S
S
E
S
E
...

result:

ok 840 steps

Test #70:

score: 100
Accepted
time: 4ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

000011110000000001010010000000001001110000001111100110111011001011111011111100001000001000111111010101101010101010010110010101101010111110101100011110111000010110100100001010001110010001000000001000110110101110101100100000110010100110100001010100011001011100001111100110110101111000101000000111110010...

input:

walk
0000111100000000010100100000000010011100000011111001101110110010111110111111000010000010001111110101011010101010100101100101011010101111101011000111101110000101101001000010100011100100010000000010001101101011101011001000001100101001101000010101000110010111000011111001101101011110001010000001111...

output:

N
N
E
S
S
E
N
E
E
E
S
E
E
N
E
N
N
W
N
W
W
N
W
W
N
E
N
N
N
N
N
N
E
E
E
S
E
S
S
E
E
E
S
S
S
S
E
E
S
E
E
S
S
E
E
E
N
E
N
E
E
E
N
N
E
S
E
N
E
N
N
N
N
E
E
E
E
E
N
N
W
N
N
N
E
E
E
E
E
E
E
E
N
N
E
E
N
N
N
W
N
N
N
N
N
N
N
N
N
N
E
E
N
W
W
W
W
N
E
E
E
N
E
N
N
E
E
E
E
S
E
S
S
S
S
E
E
E
E
S
S
E
S
E
E
E
E
S
E
E
...

result:

ok 728 steps

Test #71:

score: 100
Accepted
time: 4ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101100010011100011000111001001011110101001100110010111111100110100100110000101110010101111010001111110001111001111110011000111011000111010010101001011011000011101000011111000111111010100111111010111101010000011010111100110010110000010101010001100011110101111101100110111011011101010001110000110110110...

input:

walk
1011000100111000110001110010010111101010011001100101111111001101001001100001011100101011110100011111100011110011111100110001110110001110100101010010110110000111010000111110001111110101001111110101111010100000110101111001100101100000101010100011000111101011111011001101110110111010100011100001101...

output:

E
E
N
N
N
N
E
N
N
N
E
E
E
E
E
E
E
N
E
S
E
E
E
S
E
E
S
E
N
N
E
N
N
N
E
S
E
E
S
E
E
E
N
E
S
E
S
S
E
E
S
E
N
E
N
W
N
N
N
N
E
N
E
E
E
E
E
E
S
E
S
W
S
S
W
S
S
E
S
E
S
E
S
E
E
E
E
N
E
E
N
E
E
E
E
N
W
W
N
W
N
N
W
W
N
W
W
N
N
N
N
N
N
N
N
N
W
N
N
E
E
E
E
S
E
S
S
E
S
E
E
S
E
S
E
E
N
N
N
N
W
W
N
N
E
E
E
N
E
E
...

result:

ok 792 steps

Test #72:

score: 100
Accepted
time: 1ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

100110001100001011001110011010110011110111101111110111010000110000000100010011100011110110010110010011101111011011011111001011111010000101000010011001100000000111000011010010000111010111000110001000100000101110101010111000000110110101010110010000111010101010010101111000000100010111011100001100011010...

input:

walk
1001100011000010110011100110101100111101111011111101110100001100000001000100111000111101100101100100111011110110110111110010111110100001010000100110011000000001110000110100100001110101110001100010001000001011101010101110000001101101010101100100001110101010100101011110000001000101110111000011000...

output:

N
E
E
E
N
E
N
N
N
W
N
N
E
E
S
E
N
E
E
E
E
E
N
E
E
S
S
S
E
E
E
N
N
E
E
S
E
E
N
E
S
E
E
S
E
E
E
S
S
S
E
S
S
E
E
N
E
E
E
N
E
N
N
E
E
E
E
N
W
N
N
E
N
E
E
E
E
N
E
S
S
W
S
E
E
E
E
E
S
E
E
N
E
N
E
E
N
N
E
N
E
E
E
N
N
N
N
W
N
W
W
N
N
E
N
N
E
N
N
N
N
W
N
N
N
N
W
W
N
W
N
W
W
N
N
W
S
W
S
S
S
W
N
N
N
N
W
W
N
N
...

result:

ok 1010 steps

Test #73:

score: 100
Accepted
time: 1ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101100001111011101111100101011010011011100011101010000111011011001111110001001011110000111101001110001000110011011100000110010111011101011100101010100101101011110010111100000000011101010101010101100101111011000000011100001111111010111111001110100111011101000100010100100010011010001101001101110100100...

input:

walk
1011000011110111011111001010110100110111000111010100001110110110011111100010010111100001111010011100010001100110111000001100101110111010111001010101001011010111100101111000000000111010101010101011001011110110000000111000011111110101111110011101001110111010001000101001000100110100011010011011101...

output:

E
E
E
N
N
W
W
N
N
N
E
E
E
E
E
E
S
E
S
E
E
N
N
W
N
N
E
N
N
E
E
N
E
S
E
S
S
S
E
E
E
N
E
E
N
E
E
N
N
E
S
E
E
E
S
E
E
N
N
E
N
N
E
N
W
W
N
E
N
E
E
S
S
E
E
N
N
N
W
N
N
N
N
E
N
E
N
E
S
S
E
S
E
E
N
N
N
E
E
N
E
E
E
N
E
E
E
N
E
E
S
S
S
E
E
N
N
N
W
N
N
N
E
E
E
E
N
N
E
S
E
E
E
S
S
S
E
S
E
E
N
N
N
N
N
E
E
E
E
E
...

result:

ok 902 steps

Test #74:

score: 100
Accepted
time: 0ms
memory: 4608kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

101001001001011101001001100001011010111000101011000001110100100100000111000101101100110110010011110010001000011101101101101000001101010000001011000011101110010110110001001000111101100001011110010111011110000101100111110100000100111010111101110100101011110110011111000111100111110011111000001101100011...

input:

walk
1010010010010111010010011000010110101110001010110000011101001001000001110001011011001101100100111100100010000111011011011010000011010100000010110000111011100101101100010010001111011000010111100101110111100001011001111101000001001110101111011101001010111101100111110001111001111100111110000011011...

output:

N
E
S
E
N
E
E
N
E
E
S
E
S
E
N
E
N
N
N
N
W
N
N
W
W
W
N
E
E
N
E
N
E
E
N
E
E
E
N
N
W
N
W
N
N
W
W
N
N
W
N
W
N
W
N
W
N
W
N
W
N
N
N
E
N
N
N
N
N
N
E
N
N
E
N
E
E
E
E
N
N
W
N
W
N
N
N
N
N
N
N
N
E
E
E
E
N
E
N
W
N
N
W
W
N
N
W
S
W
N
N
N
W
N
W
N
W
N
N
W
N
N
E
N
W
N
E
N
E
E
N
E
N
W
N
E
E
E
N
N
W
N
E
N
N
E
E
E
N
N
...

result:

ok 774 steps

Test #75:

score: 100
Accepted
time: 3ms
memory: 4736kb

input:

view
200
###################################################################################################################################################################################################################################################################################################...

output:

011001000010100111110100010110111011000110101101010101111010011111010101011001110011101000010000110111010101100000001010000001101000001100101011110110100110110000000010100111101011011110100010000101001101010011101101101101000110110100110111010100100001011101111100100001000000001000000010000000000110...

input:

walk
0110010000101001111101000101101110110001101011010101011110100111110101010110011100111010000100001101110101011000000010100000011010000011001010111101101001101100000000101001111010110111101000100001010011010100111011011011010001101101001101110101001000010111011111001000010000000010000000100000000...

output:

E
E
E
E
E
N
W
W
N
W
W
W
N
N
E
E
N
N
E
N
E
E
N
E
E
N
N
E
E
N
N
E
N
N
W
N
W
S
W
W
N
E
N
W
N
N
W
N
N
N
W
N
E
N
W
W
N
N
N
E
S
E
N
E
E
N
E
N
N
N
E
N
E
E
N
W
N
N
E
S
E
N
E
E
E
S
S
W
S
E
E
S
E
E
N
E
E
E
E
E
N
N
E
N
N
N
N
E
E
N
E
S
E
E
N
N
E
N
N
E
N
E
E
E
E
E
E
N
N
N
E
S
E
S
W
S
S
E
E
S
E
E
E
N
E
E
E
S
S
E
...

result:

ok 964 steps