import std.stdio;
import std.ascii;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.random;
import std.regex;
import std.typecons;

int[char] score;
static this() {
    for (char c = '2'; c <= '9'; c++) score[c] = cast(int)(c - '0');
    score['T'] = 10;
    score['J'] = 11;
    score['Q'] = 12;
    score['K'] = 13;
    score['A'] = 14;
}

char T;

/* s < t ? */
bool compare(in string s, in string t) {
    if (s[1] == T) {
        if (t[1] == T) {
            return score[ s[0] ] < score[ t[0] ];
        } else {
            return false;
        }
    } else {
        if (t[1] == T) {
            return true;
        } else {
            return score[ s[0] ] < score[ t[0] ];
        }
    }
}

string[][] F;

bool input() {
    T = readln.chomp[0];
    if (T == '#') return false;
    F = new string[][4];
    foreach (i; 0 .. 4) {
        F[i] = readln.chomp.split(" ").array;
    }
    return true;
}

void solve() {
    auto ans = new int[2];
    foreach (i; 0 .. 13) {
        auto w = 0;
        foreach (j; 1 .. 4) {
            if (compare(F[w][i], F[j][i])) {
                w = j;
            }
        }
        if (score[ F[w][i][0] ] > 6) ans[w & 1]++;
    }
    writeln(ans[0] < ans[1] ? "EW": "NS", " ", abs(ans[0] - ans[1]));
}

void main() {
    while (input) solve;
}