class Solution:
def findOcurrences(self, text: str, first: str, second: str) -> List[str]:
s = text.split(' ')
n = len(s)
res = []
if n < 3:
return res
i, j, k = 0, 1, 2
while k < n:
if s[i] == first and s[j] == second:
res.append(s[k])
i += 1
j += 1
k += 1
return res