In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[8687, 'a', 'x', 'c', '4445', 'e', 'G', 'B', '9263', '1103', '5165', 'N', 'B', 'x', 5831, 'M'], ['V', 'Y', 'J', 9765, 'n', 'S', 6897, '4445', 'e', 'G', 'B', '9263', '1103', '5165', 'm', 1525, 4019, 'G', 5931, 2297, 'G']