#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { string s; cin >> s; vector cnt(26, 0); for (char c : s) cnt[c - 'a']++; auto get = [&](char c) { return cnt[c - 'a']; }; int y = min({ get('y'), get('u'), get('k'), get('a'), get('r'), get('i') }); int a = min({ get('a') / 2, get('k'), get('r'), get('i') }); int x = min({ get('y'), get('u') / 3, get('z') / 2, get('k'), get('i') }); cout << y << ' ' << a << ' ' << x << endl; return 0; }