s=[0]*26 for c in input():s[ord(c)-97]+=1 m=min t=m(s[8],s[10]) x=s[24] y=s[20] z=s[17] print(m(x,y,s[0],z,t),m(s[0]//2,z,t),m(x,y//3,s[25]//2,t))