#ifdef NACHIA #define _GLIBCXX_DEBUG #else #define NDEBUG #endif #include #include #include #include using i64 = long long; using u64 = unsigned long long; #define rep(i,n) for(int i=0; i void chmin(A& l, const A& r){ if(r < l) l = r; } template void chmax(A& l, const A& r){ if(l < r) l = r; } using namespace std; void testcase(){ string S; cin >> S; int A[1000] = {}; for(char c : S) A[c]++; int a = min({ A['y'], A['u']/3, A['z']/2, A['k'], A['i'] }); int b = min({ A['a']/2, A['k'], A['r'], A['i'] }); int c = min({ A['y'], A['u'], A['k'], A['a'], A['r'], A['i'] }); cout << c << " " << b << " " << a << endl; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); testcase(); return 0; }