In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[6341, 2501, 2883, 'o', 2279, 's', 'p', '1615', 'J', '189', 'P', 'd', 'Z', 'p', 8871], [3977, 'c', 'j', 'h', 7627, 'n', 'p', '1615', 'J', '189', 'P', 'd', 'w', 8187, 'U']