#include <stdio.h>
#include <string.h>

int main(void)
{
    int N;
    char S[200000][11];
    char R[200000][11];
    int result = 0;

    scanf("%d", &N);
    
    for (int i = 0; i < N; i++) {
        scanf("%s", S[i]);
    }

    strcpy(R[0], S[0]);

    result = 1;
    int flag = 1;
    for (int i = 1; i < N; i++) {
        flag = 1;
        for (int j = 0; j < result; j++) {
            if (strlen(S[i]) != strlen(R[j]))
                continue;
            if (S[i][0] != R[j][0])
                continue;
            if (S[i][1] != R[j][1])
                continue;
            if (S[i][2] != R[j][2])
                continue;
            if (S[i][3] != R[j][3])
                continue;
            if (S[i][4] != R[j][4])
                continue;
            if (S[i][5] != R[j][5])
                continue;
            if (strcmp(S[i], R[j]) == 0) {
                flag = 0;
                break;
            }
        }
        if (flag) {
            strcpy(R[result], S[i]);
            result++;
        }
    }

    printf("%d\n", result);

    return 0;
}