from collections import Counter S=input().strip() C=Counter(S) Y=min(C["y"],C["u"],C["k"],C["a"],C["r"],C["i"]) A=min(C["a"]//2,C["k"],C["r"],C["i"]) X=min(C["y"],C["u"]//3,C["z"]//2,C["k"],C["i"]) print(Y,A,X)