Hide

Problem F
Korok Phrases

\includegraphics[width=0.4\textwidth ]{korok_sm.jpeg}

Upon venturing through the wilderness of Hyrule, Link discovers a hidden people named the Korok.1 They’re very mysterious. At first, he thinks they all repeat the same phrase when he discovers them, but after finding enough of them, he realizes that the phrases sound different. They’re speaking their own language!

For example, “Twee hee hee” is different from “tWeE hee Hee,” which is different from “Twee hEE hEE.” He wants to see how many different phrases these Korok make.

Input

The first line of input contains one integer $N$ ($0 \leq N \leq 10^5$), which is the number of phrases. The following $N$ lines will each provide one phrase consisting of at most $10$ space-delimited words. Words will be composed of uppercase and/or lowercase letters. There will be no empty words and each word is at most $10$ letters long.

Output

Print the number of unique phrases in the given list.

Sample Input 1 Sample Output 1
2
Twee hee Hee
twEe HeE Hee
2
Sample Input 2 Sample Output 2
3
Twee hee hee
Twee hee hee
Twee hee hee
1
Sample Input 3 Sample Output 3
0
0

Footnotes

  1. Legend of Zelda, associated characters, and above image © Nintendo Co., Ltd. Used here for educational purposes only, in accordance with fair use as defined by section 107 of the Copyright Act.

Please log in to submit a solution to this problem

Log in