I have a nested list like this:

```
lst = [['one two', 'three', '10'], ['spam eggs', 'spam', '8'],
       ['two three', 'four', '5'], ['foo bar', 'foo', '7'],
       ['three four', 'five', '9']] 

```

The last element is a kind of probability.
What I need is to find elements, where second and third words of one element match first and second word of another, for example:

```
['one two', 'three', '10'] match ['two three', 'four', '5'] match  ['three four', 'five', '9']

```

And make chains like:

```
one two 10 three 5 four 9 five

```

I understand that first step must be tokinization of elements:

```
lst = ([' '.join(x).split() for x in lst])
for i in lst: 
    print(i)

```

So I get

```
['one', 'two', 'three', '10']
['spam', 'eggs', 'spam', '8']
['two', 'three', 'four', '4']
['foo', 'bar', 'foo', '7']
['three', 'four', 'five', '9']

```

Next step should be some kind of iterative search over each element of the list, but I am a bit stuck with Python realization of such search.
Any help would be appreciated.