#include void chmin(int *a, int b) { if (*a > b) *a = b; } void chmax(int *a, int b) { if (*a < b) *a = b; } int main() { char S[1000001]; scanf("%s", S); int i, a[26] = {}, Y = 0, A = 0, X = 0, tmp; for (i = 0; S[i] != 0; i++) a[S[i] - 'a']++; tmp = 1000000; chmin(&tmp, a['y' - 'a']); chmin(&tmp, a['u' - 'a']); chmin(&tmp, a['k' - 'a']); chmin(&tmp, a['a' - 'a']); chmin(&tmp, a['r' - 'a']); chmin(&tmp, a['i' - 'a']); Y = tmp; tmp = 1000000; chmin(&tmp, a['a' - 'a'] / 2); chmin(&tmp, a['k' - 'a']); chmin(&tmp, a['r' - 'a']); chmin(&tmp, a['i' - 'a']); A = tmp; tmp = 1000000; chmin(&tmp, a['y' - 'a']); chmin(&tmp, a['u' - 'a'] / 3); chmin(&tmp, a['z' - 'a'] / 2); chmin(&tmp, a['k' - 'a']); chmin(&tmp, a['i' - 'a']); X = tmp; printf("%d %d %d\n", Y, A, X); fflush(stdout); return 0; }