LCS via Suffix Automaton



Need help in finding the LCS of two strings vis suffix automata. |S|<=25000.
I am able to construct the suffix automata for a pattern P[] but am unable to understand how to calculate the LCS.

How do I use the transition function?

PS:Query is because I was unable to understand the editorial of SSTORY.

Any help is appreciated!


could you please describe the suffix automata construction for pattern