def solution(skill, skill_trees):
answer = 0
s = list(skill[:i] for i in range(1,len(skill)+1))
sk = list(skill)
for st in skill_trees:
sa = '';j=0
stt = list(st)
for i in stt:
if i in sk:
sa+=i
if sa in s:
answer += 1
elif sa == '':
answer += 1
return answer