#include using namespace std; const string berry[4]={"akai","marui","okii","umai"}; int main(){ int N; cin>>N; int ans=0; for(int i=0;iS(4); for(int j=0;j<4;j++){ cin>>S[j]; } sort(S.begin(),S.end()); bool ok=true; for(int j=0;j<4;j++){ if(S[j]!=berry[j]){ ok=false; break; } } if(ok){ ans++; } } cout<