In the year 3021, there is over 1000 Spider-man movies made. Sadly because of lack of creativity, many of the movies have the same plot as others. You, an avid Spider-fan decides and a Computer Science major, wants to find out how many different Spider-man movies there are. In order to do that you must create a program to evaluate the number of different movies there are from a selection of Q Spider-man movies.

First thing you do is watch all the movies and grade them using a 10 character string. each character in the string corresponds to an attribute of the movie and can be graded by the characters '1', '0', or 'x'. '1' means that that attribute is good, '0' means its bad, while 'x' means its the best part of the movie.
Each movie will have at most one 'x'. (e.g. 101010101x, x111111111). 2 movies are considered the same if their attributes are exactly the same. Below are some examples:
Now all you have to do is write a program to find all the different movies in the selection.
An integer Q which represents the number of movies in a selection. (1 <= Q <= 10000 100000)
Q lines of 10 character string which consist of character '1', '0', and 'x'
note: there can only be at most one 'x' in each string
The number of different movies in the selection followed by a newline