Here is a try:
>>> word1= ('a','b','c','d','e','f','g','h','i','j','k','l','m')
>>> word2= ('z','y','x','w','v','u','t','s','r','q','p','o','n')
>>> [w for w in s.split() if w[0] in word1 and w[-1] in word2 and word1.index(w[0]) == word2.index(w[-1])]
['boy']