#include using namespace std; #define REP(i,a,b) for(int i=a;i=b;i--) #define CLR(a,t) memset(a,t,sizeof a) #define help ios::sync_with_stdio(0) #define TCASE int t;cin>>t;while(t--) #define f first #define s second #define mp make_pair #define pb push_back int main(){ help; int n; string str; int up=0,low=0,dig=0,ans=0,ans2=0,spe=0; cin>>n>>str; if(n<6) ans=6-n; REP(i,0,n){ if(str[i]>='0' and str[i]<='9') dig=1; else if(str[i]>='a' and str[i]<='z') low=1; else if(str[i]>='A' and str[i]<='Z') up=1; else if(str[i]=='!' or str[i]=='@' or str[i]=='#' or str[i]=='$' or str[i]=='%' or str[i]== '^' or str[i]=='&' or str[i]=='*' or str[i]=='(' or str[i]==')' or str[i]=='-' or str[i]=='+') spe=1; } ans2=4-(dig+low+up+spe); cout<