Vera adores poems. All the poems Vera knows are divided into quatrains (groups of four lines) and in each quatrain some lines contain rhymes.

Let's consider that all lines in the poems consist of lowercase Latin letters (without spaces). Letters "a", "e", "i", "o", "u" are considered vowels.

Two lines rhyme if their suffixes that start from the k-th vowels (counting from the end) match. If a line has less than k vowels, then such line can't rhyme with any other line. For example, if k = 1, lines commit and hermit rhyme (the corresponding suffixes equal it), and if k = 2, they do not rhyme (ommit ≠ ermit).

Today on a literature lesson Vera learned that quatrains can contain four different schemes of rhymes, namely the following ones (the same letters stand for rhyming lines): 

  * Clerihew (aabb); 
  * Alternating (abab); 
  * Enclosed (abba). 



If all lines of a quatrain pairwise rhyme, then the quatrain can belong to any rhyme scheme (this situation is represented by aaaa).

If all quatrains of a poem belong to the same rhyme scheme, then we can assume that the whole poem belongs to this rhyme scheme. If in each quatrain all lines pairwise rhyme, then the rhyme scheme of the poem is aaaa. Let us note that it doesn't matter whether lines from different quatrains rhyme with each other or not. In other words, it is possible that different quatrains aren't connected by a rhyme.

Vera got a long poem as a home task. The girl has to analyse it and find the poem rhyme scheme. Help Vera cope with the task.

Input

The first line contains two integers n and k (1 ≤ n ≤ 2500, 1 ≤ k ≤ 5) — the number of quatrains in the poem and the vowel's number, correspondingly. Next 4n lines contain the poem. Each line is not empty and only consists of small Latin letters. The total length of the lines does not exceed 104.

If we assume that the lines are numbered starting from 1, then the first quatrain contains lines number 1, 2, 3, 4; the second one contains lines number 5, 6, 7, 8; and so on.

Output

Print the rhyme scheme of the poem as "aabb", "abab", "abba", "aaaa"; or "NO" if the poem does not belong to any of the above mentioned schemes.

Examples

Input

1 1
day
may
sun
fun


Output

aabb


Input

1 1
day
may
gray
way


Output

aaaa


Input

2 1
a
a
a
a
a
a
e
e


Output

aabb


Input

2 1
day
may
sun
fun
test
hill
fest
thrill


Output

NO

Note

In the last sample both quatrains have rhymes but finding the common scheme is impossible, so the answer is "NO".
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;



public class C99P3 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;
    
    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C99P3();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int ver = nextInt();
        int k = nextInt();
        String [][] poem = new String[ver][4];
        boolean cant = false;
        for (int i = 0; i < poem.length; i++) {
            for (int j = 0; j < poem[i].length; j++) {
                poem[i][j]=adj(nextString(),k);
                if(poem[i][j]==null){cant=true;break;}
            }
        }
        String shy = "aaaa";
        if(!cant){
            for (int i = 0; i < poem.length; i++) {
                String s= sch(poem[i]);
                if(s==null){shy=null;break;}
                shy=merge(shy,s);
                if(shy==null)break;
            }
            if(shy==null)writeln("NO");
            else writeln(shy);
        }else{
            writeln("NO");
        }
        
        
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }
    private static String merge(String shy, String s) {
        // TODO Auto-generated method stub
        if(shy.equals("aaaa"))return s;
        if(s.equals("aaaa"))return shy;
        if(s.equals(shy))return s;
        return null;
    }
    private static String sch(String[] s) {
        // TODO Auto-generated method stub
        if(aaaa(s))return "aaaa";
        if(aabb(s))return "aabb";
        if(abab(s))return "abab";
        if(abba(s))return "abba";
        return null;
    }
    private static boolean abba(String[] s) {
        // TODO Auto-generated method stub
        return s[0].equals(s[3])&&s[1].equals(s[2]);
    }
    private static boolean abab(String[] s) {
        // TODO Auto-generated method stub
        return s[0].equals(s[2])&&s[1].equals(s[3]);
    }
    private static boolean aabb(String[] s) {
        // TODO Auto-generated method stub
        return s[0].equals(s[1])&&s[2].equals(s[3]);
    }
    private static boolean aaaa(String[] s) {
        // TODO Auto-generated method stub
        return s[0].equals(s[1])&&s[1].equals(s[2])&&s[2].equals(s[3]);
    }
    private static String adj(String nextString,int k) {
        // TODO Auto-generated method stub
        for (int i = nextString.length()-1; i >=0; i--) {
            if(isvaw(nextString.charAt(i)))k--;
            if(k==0)return nextString.substring(i);
        }
        return null;
    }
    private static boolean isvaw(char c) {
        // TODO Auto-generated method stub
        
        return c=='a'||c=='i'||c=='e'||c=='o'||c=='u';
    }
    public C99P3() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem 
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

    

}
