public static void main(String[] args) throws IOException
    {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        while (true)
        {
            String name = reader.readLine();
            if (name.isEmpty()) break;

            int age = Integer.parseInt(reader.readLine());
            if (age == 0) age = 6;

            int weight = Integer.parseInt(reader.readLine());
            if (weight == 0) weight = 5;

            int tailLength = Integer.parseInt(reader.readLine());
            if (tailLength == 0) tailLength = 22;

            Cat cat = new Cat(name, age, weight, tailLength);
            CATS.add(cat);
        }

        printList();
    }