In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[5801, 'w', 'F', 'l', 8189, 'M', 1729, 'N', '6839', 'r', 'H', 'v', 'p', 'm', 'f', '4715', 'Y', 2861, 5023], [3819, 3135, 9041, 1291, 6567, '6839', 'r', 'H', 'v', 'p', 'm', 'f', '4715', 'A', 597, 'B', 'k', 'p', 'p']