#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000001 int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); vector t = {"akai","marui","okii","umai"}; sort(t.begin(),t.end()); int n;cin>>n; int ans = 0; rep(i,n){ vector s(4); rep(j,4)cin>>s[j]; sort(s.begin(),s.end()); if(s==t)ans++; }cout<