1. JAVA, Till Fischer

/*

 ============================================================================

 Name            : Main.java

 Author            : Till Fischer

 Description    : 576 - Haiku Review

 Accepted        : Accepted

 Time            : 0.150

 ============================================================================

 */



import java.io.BufferedReader;

import java.io.BufferedWriter;

import java.io.IOException;

import java.io.InputStreamReader;

import java.io.OutputStreamWriter;



public class Main {



    public static void main(String[] args) throws IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

        String line;

        String[] splittedLine;

        boolean check;

        while(reader.ready()) {

            line = reader.readLine();

            if(line.equals("e/o/i"))

                break;

            splittedLine = line.split("/");

            check = check(splittedLine[0], 5);

            if(!check) {

                writer.write("1\n");

                continue;

            }

            check = check(splittedLine[1], 7);

            if(!check) {

                writer.write("2\n");

                continue;

            }

            check = check(splittedLine[2], 5);

            if(!check) {

                writer.write("3\n");

                continue;

            }

            writer.write("Y\n");

        }

        reader.close();

        writer.flush();

        writer.close();

    }



    private static boolean check(String string, int count) {

        boolean before = false;

        int myCount = 0;

        for(int i = 0; i < string.length(); i++) {



            char cur = string.charAt(i);

            switch(cur) {

            case 'e':

            case 'a':

            case 'i':

            case 'o':

            case 'u':

            case 'y':

                if(!before) {

                    before = true;

                    myCount++;

                }

                break;

            default:

                before = false;

            break;

            }

        }

        return myCount == count;

    }

}