I have a list of bigrams and trigrams:

```
string = 'do not be sad'

a_list: = ['do', 'not', 'do not', 'be', 'not be', 'do not be', 'sad', 'be sad', 'not be sad']

```

I was wondering if there is a function to reverse the bigram and trigram in `a_list`? I know I could join all the strings and remove duplicates, but that loses the structure of the sentence. I'm looking if someone has any tips so that the `a_list` can be reverted back to its original string.

Desired output would be:

```
b_list = ['do not be sad']

```