def main(): 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) pass """""""""""""""""""""""""" ########################## """""""""""""""""""""""""" import heapq from random import * from bisect import * from itertools import * from collections import * from sortedcontainers import * from functools import cache from math import * from more_itertools import * from decimal import getcontext from atcoder.segtree import SegTree from atcoder.fenwicktree import FenwickTree from atcoder.lazysegtree import LazySegTree from atcoder.dsu import DSU import sys # import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') sys.setrecursionlimit(10**9) sys.set_int_max_str_digits(0) MOD1= 998244353 MOD2 = 10 ** 9 + 7 INF = 1 << 60 eng = "abcdefghijklmnopqrstuvwxyz" ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" MOD = MOD1 def batch(A): A = str(A) if A != A[::-1]: return False else: return True def sieve(limit): is_prime = [True] * (limit + 1) is_prime[0], is_prime[1] = False, False primes = [] for i in range(2, limit + 1): if is_prime[i]: primes.append(i) for multiple in range(i * i, limit + 1, i): is_prime[multiple] = False return primes # 素因数分解 def P_check(n): factors = [] limit = int(sqrt(n)) + 1 primes = sieve(limit) for prime in primes: while n % prime == 0: factors.append(prime) n //= prime if n == 1: break if n > 1: factors.append(n) return factors acc = accumulate main()