description: You had n positive integers a_1, a_2, ..., a_n arranged in a circle. For each pair of neighboring numbers (a_1 and a_2, a_2 and a_3, ..., a_{n - 1} and a_n, and a_n and a_1), you wrote down: are the numbers in the pair equal or not.
  
  Unfortunately, you've lost a piece of paper with the array a. Moreover, you are afraid that even information about equality of neighboring elements may be inconsistent. So, you are wondering: is there any array a which is consistent with information you have about equality or non-equality of corresponding pairs?
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases. Next t cases follow.
  
  The first and only line of each test case contains a non-empty string s consisting of characters E and/or N. The length of s is equal to the size of array n and 2 ≤ n ≤ 50. For each i from 1 to n: 
  
    * if s_i = E then a_i is equal to a_{i + 1} (a_n = a_1 for i = n); 
    * if s_i = N then a_i is not equal to a_{i + 1} (a_n ≠ a_1 for i = n). 
  
  Output
  
  For each test case, print YES if it's possible to choose array a that are consistent with information from s you know. Otherwise, print NO.
  
  It can be proved, that if there exists some array a, then there exists an array a of positive integers with values less or equal to 10^9.
  
  Example
  
  Input
  
  
  4
  EEE
  EN
  ENNEENE
  NENN
  
  
  Output
  
  
  YES
  NO
  YES
  YES
  
  Note
  
  In the first test case, you can choose, for example, a_1 = a_2 = a_3 = 5.
  
  In the second test case, there is no array a, since, according to s_1, a_1 is equal to a_2, but, according to s_2, a_2 is not equal to a_1.
  
  In the third test case, you can, for example, choose array a = [20, 20, 4, 50, 50, 50, 20].
  
  In the fourth test case, you can, for example, choose a = [1, 3, 3, 7].
solution: import java.io.*;
  import java.util.*;
  
  public class Main{
      static void main() throws Exception{
          int cnt=0;
          char[]in=sc.nextLine().toCharArray();
          for(char c:in){
              if(c=='N')cnt++;
          }
          pw.println(cnt==1?"NO":"YES");
      }
      public static void main(String[] args) throws Exception{
          sc=new MScanner(System.in);
  //		sc=new MScanner(" .in");
          pw = new PrintWriter(System.out);
          int tc=1;
          tc=sc.nextInt();
          for(curt=1;curt<=tc;curt++) {
  //			pw.printf("Case #%d:", curt);
              main();
          }
          pw.flush();
      }
      static int curt;
      static PrintWriter pw;
      static MScanner sc;
      static class MScanner {
          StringTokenizer st;
          BufferedReader br;
          public MScanner(InputStream system) {
              br = new BufferedReader(new InputStreamReader(system));
          }
  
          public MScanner(String file) throws Exception {
              br = new BufferedReader(new FileReader(file));
          }
  
          public String next() throws IOException {
              while (st == null || !st.hasMoreTokens())
                  st = new StringTokenizer(br.readLine());
              return st.nextToken();
          }
          public int[] intArr(int n) throws IOException {
              int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
              return in;
          }
          public long[] longArr(int n) throws IOException {
              long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
              return in;
          }
          public int[] intSortedArr(int n) throws IOException {
              int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
              shuffle(in);
              Arrays.sort(in);
              return in;
          }
          public long[] longSortedArr(int n) throws IOException {
              long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
              shuffle(in);
              Arrays.sort(in);
              return in;
          }
          public Integer[] IntegerArr(int n) throws IOException {
              Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
              return in;
          }
          public Long[] LongArr(int n) throws IOException {
              Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
              return in;
          }
          public String nextLine() throws IOException {
              return br.readLine();
          }
  
          public int nextInt() throws IOException {
              return Integer.parseInt(next());
          }
  
          public double nextDouble() throws IOException {
              return Double.parseDouble(next());
          }
  
          public char nextChar() throws IOException {
              return next().charAt(0);
          }
  
          public long nextLong() throws IOException {
              return Long.parseLong(next());
          }
  
          public boolean ready() throws IOException {
              return br.ready();
          }
  
          public void waitForInput() throws InterruptedException {
              Thread.sleep(3000);
          }
  
      }
      static void dbg(int[]in) {
          System.out.println(Arrays.toString(in));
      }
      static void dbg(long[]in) {
          System.out.println(Arrays.toString(in));
      }
      static void sort(int[]in) {
          shuffle(in);
          Arrays.sort(in);
      }
      static void sort(long[]in) {
          shuffle(in);
          Arrays.sort(in);
      }
      static void shuffle(int[]in) {
          for(int i=0;i<in.length;i++) {
              int idx=(int)(Math.random()*in.length);
              int tmp=in[i];
              in[i]=in[idx];
              in[idx]=tmp;
          }
      }
      static void shuffle(long[]in) {
          for(int i=0;i<in.length;i++) {
              int idx=(int)(Math.random()*in.length);
              long tmp=in[i];
              in[i]=in[idx];
              in[idx]=tmp;
          }
      }
  }