def solution(babbling):
a = 0
s = ["aya", "ye", "woo", "ma"]
def f_ck(bi,ids = [0,1,2,3]):
for i in ids:
if bi[:len(s[i])] == s[i]:
bi = bi[len(s[i]):]
if len(bi) != 0:
ids = [0,1,2,3]
ids.remove(i)
return f_ck(bi,ids)
else:
return True
return False
for bi in babbling:
ids = [0,1,2,3]
ai = f_ck(bi,ids)
if ai:
a += 1
return a