In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[2451, 7207, 'd', 4501, 'U', 10001, 'L', 3181, 3773, 'g', 'a', 9065, '1997', '9651', 'Q', 'M', '8409', 'U', '3979', '7771', 'Y', '8613', 'n', '9371', 'r', 5473, 'C', 7451, 8895, 9239, 841, 'f', 9631, 7153, 4867], ['h', 3023, 'p', '1997', '9651', 'Q', 'M', '8409', 'U', '3979', '7771', 'Y', '8613', 'n', '9371', 'q', 8857, 8221, 'm', 'G', 2479]