#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep2(i,s,n) for (int i = (s); i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
    ll N;
    scanf("%lld",&N);
    char s[200000][10];
    rep(i,N){
        scanf("%s",&s[i][0]);
    }
    ll count=0;
    rep(i,N){
        if(s[i][0]!='\0'){
            rep2(j,i+1,N){
                int strcount=0;
                rep(k,10){
                    if(s[i][k]==s[j][k]){
                        strcount++;
                    }
                }
                if(strcount==10){
                    s[j][0]='\0';
                }
            }
            count++;
        }
    }
    printf("%lld",count);
    return 0;
}