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.

['c', 'S', 'i', 'u', 'g', '5305', '5795', 'm', 'a', 'x', 'N', 6575, 'w', 'Z', 'C', 4163], ['R', 9885, 'g', '5305', '5795', 'm', 'a', 'x', 'a', 'h', 4637, 'S']
Output:
g, 5305, 5795, m, a, x