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.

[3779, 'D', 'c', 'X', 'e', 'P', 'l', 5629, 'y', 2367], [9859, 'J', 'c', 'X', 'e', 'P', 'i', 9187]
Output:
c, X, e, P