#K88437. Language Detection

    ID: 37308 Type: Default 1000ms 256MiB

Language Detection

Language Detection

This problem requires you to determine the language of multiple paragraphs. For each paragraph, you need to decide whether it is written in English or Spanish. The paragraphs are analyzed by counting the occurrences of common words. If the number of common Spanish words is greater than that of English words, then the paragraph is identified as Spanish; otherwise, it is considered English.

The sets of common words are given as follows:

  • English: \( \{\texttt{the}, \texttt{and}, \texttt{is}, \texttt{in} \} \)
  • Spanish: \( \{\texttt{el}, \texttt{y}, \texttt{es}, \texttt{en} \} \)

Note: In case of a tie or if there are no occurrences of any common words, output "English".

inputFormat

The first line contains an integer \( n \) representing the number of paragraphs. Each of the following \( n \) lines contains a single paragraph. Each paragraph may include multiple words separated by spaces.

outputFormat

For each paragraph, print a single line with either "English" or "Spanish" indicating the detected language.

## sample
3
the cat and the dog
el gato y el perro
this is a simple test
English

Spanish English

</p>