from collections import Counter S=input() C=Counter(S) l=['y','u','k','a','r','i'] Y,A,X=10**18,10**18,10**18 for s in l: Y=min(Y,C[s]) l=['k','r','i'] for s in l: A=min(A,C[s]) A=min(A,C['a']//2) l=['y','k','i'] for s in l: X=min(X,C[s]) X=min(X,C['u']//3,C['z']//2) print(Y,A,X)