#include #include #include #include using namespace std; bool conn[1010][1010]; int N; typedef pair < int, int > P; P T[1010]; typedef pair < pair , int > TT; pair < pair , int > A[1010], B[1010]; int main() { while ( scanf("%d",&N), N!=0 ) { for ( int i = 0; i < N; ++i ) { int x, y; scanf( "%d %d", &x, &y ); A[i].first.first = x; A[i].first.second = y; A[i].second = i; B[i].first.first = y; B[i].first.second = x; B[i].second = i; T[i].first = x; T[i].second = y; } sort( A, A+N ); sort( B, B+N ); for ( int i = 0; i < N; i += 2 ) { int a, b; a = A[i].second; b = A[i+1].second; conn[a][b] = true; conn[b][a] = true; } for ( int i = 0; i < N; i += 2 ) { int a, b; a = B[i].second; b = B[i+1].second; conn[a][b] = true; conn[b][a] = true; } int ret[1010], sz = 0; int cur = 0; ret[0] = 0; for ( sz = 1; sz < N; ++sz ) { for ( int j = 0; j < N; ++j ) { if ( conn[cur][j] ) { conn[cur][j] = false; conn[j][cur] = false; cur = j; ret[sz] = j; break; } } } ret[N] = 0; long long area = T[ret[0]].first * ( T[ret[1]].second-T[ret[N-1]].second ); for ( int i = 1; i < N-1; ++i ) area += T[ret[i]].first * ( T[ret[i+1]].second-T[ret[i-1]].second ); area += T[ret[N-1]].first * ( T[ret[0]].second-T[ret[N-2]].second ); if ( area > 0 ) reverse( ret, ret+N+1 ); char ans[1010] = {}; for ( int i = 0; i < N; ++i ) { if ( T[ret[i]].first < T[ret[(i+1)]].first ) ans[i] = 'E'; else if ( T[ret[i]].first > T[ret[(i+1)]].first ) ans[i] = 'W'; else if ( T[ret[i]].second < T[ret[(i+1)]].second ) ans[i] = 'N'; else ans[i] = 'S'; } puts( ans ); } return 0; }