Cat Lovers

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Kirito loves cats. He joined a survey with N people and a single question:

Do you like cats more or dogs more? You may only choose one.

All N people are required to answer. Each person answered with cats or dogs.

If someone responds with cats, then he or she likes cats more. Otherwise, he or she likes dogs more.

Given that all N people answered with either cats or dogs, what was the total preference?

Note: If the number of responses for cats and dogs are equal, then output equal.

Input Specification

The first line will read N (1 \le N \le 10^4), the number of people who answered.

The next N lines will contain a string, either cats or dogs.

Output Specification

The output will either be cats or dogs, cats if more people responded with cats, dogs if more people responded with dogs. Otherwise, output equal.

Sample Input 1

4
cats
cats
dogs
cats

Sample Output 1

cats

Sample Input 2

6
cats
cats
dogs
cats
dogs
dogs

Sample Output 2

equal

Comments

There are no comments at the moment.