#include <iostream> #include <string> #include <vector> using namespace std; bool checkLetter( string& s, char c) { for(int i=0;i<s.size();++i) if(s[i]==c) return true; return false; } int main() { int n; cin>>n; vector< string> a(n); for(int i=0;i<n;++i) cin>>a[i]; int ans=0; for(int i=0;i<26;++i) { bool check=true; for(int j=0;j<n;++j) if( !checkLetter(a[j],'a'+i)) check=false; if(check) ++ans; } cout<<ans; }