In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[5407, 'k', 5651, '4931', 'R', 'O', '7335', '2989', 'g', 'B', 9273, 2629, 'n', 'G'], [871, 6541, 'N', '4931', 'R', 'O', '7335', '2989', 'g', 'p', 'L', 9679, 2571]