P10847 [HackerEarth] count the characters
普及
题目描述

Harry is playing a game with is friend. He is given a notebook which has names of their friends written in various lowercase letter from 'a' to 'z'. His task is to find a 'special-letters'. A letter is a 'special-letters' if it occurs at least once in each of their friends name.

Given the list of N names, display the number of special-letters that exist in names.

Input
The first line consists of N, the number of names.
Each of the next N lines contain names. Each name consists of lowercase letters of English alphabet.

Output
Print the number of special-letter that are common in these names. If there are none, print 0.

Constraints
1 ≤ N ≤100
Each name consists of only lowercase letters ('a'-'z').
1 ≤ Length of each name ≤ 100

SAMPLE INPUT
3
abcdde
baccd
eeabcg

SAMPLE OUTPUT
3

Explanation

Only "a", "b", "c" are the 3 kind of special-letters, since these are the only characters that occur in each of the name has.

输入格式

见题面

输出格式

见题面

样例输入
3 abcdde baccd eeabcg SAMPLE
样例输出
3