You will be given a definition of a task first, then some input of the task.
In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.

['A', 7629, 'F', 5085, 8767, '9109', '7623', 'S', 'J', '2887', '2141', 'a', 3445, 9009, 't', 'i', 'B'], [4225, 5077, '9109', '7623', 'S', 'J', '2887', '2141', 'w', 5815]
Output:
9109, 7623, S, J, 2887, 2141