Let me show you how we can construct the bus from multiplied patterns.

Let's start from the first pattern and represent it as a pass in a tree.

Continue to the next button, continue this next button, and

continue this next button.

So far it was easy and not interesting.

We have four patterns and we constructed for passes from the root of the tree.

Let's go to the next one, antenna.

Now the first letter in antenna actually already

appears on the way from the root it is right here.

The second letter also appear away from the root.

And then, we need to branch

the previous pass into two passes to construct the pass for antenna.

Now let's do bandana.

So bandana we press it further.

And now we again have to branch the pass.

Continue with ananas, again branching.

And finally continue with nana, branching again.

And of what we've constructed is actually our bus.

And which is called trie of patters.