from collections import Counter S = input() N = Counter(S) N_a, N_i, N_k, N_r, N_u, N_y, N_z = N["a"], N["i"], N["k"], N["r"], N["u"], N["y"], N["z"] Y = min(N_y, N_u, N_k, N_a, N_i) A = min(N_a // 2, N_k, N_r, N_i) X = min(N_y, N_u // 3, N_z // 2, N_k, N_i) print(Y, A, X)