#include using namespace std; int main() { int N; cin >> N; vector amaou = {"akai", "marui", "okii", "umai"}; sort(amaou.begin(), amaou.end()); int ans = 0; for (int i = 0; i < N; i++) { vector check; for (int j = 0; j < 4; j++) { string S; cin >> S; check.push_back(S); } sort(check.begin(), check.end()); if (amaou == check) { ans++; } } cout << ans; }