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

char   s[26][200000][11];
int max[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

int main( int argc, char *argv[] )
{
    int n;
    int tot = 0;
    char tmp[11];

    scanf( "%d", &n );

    for( int i=0; i<n; i++ ) {
        scanf( "%10s", tmp );

        int existf = 0;
        int h = 0;

        for( int i=0; i<strlen( tmp ); i++ ) h += tmp[i];
        h %= 26;

        for( int j=0; j<max[h]; j++ ) {
            if( ! strcmp( tmp, s[h][j] ) ) existf = 1;
        }

        if( ! existf ) {
            strcpy( s[h][max[h]], tmp );
            max[h] ++;
            tot ++;
        }
    }

//    for( int i=0; i<max; i++ )
//        printf( "%s ", s[i] );

    printf( "%d\n", tot );
}
