In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['g', 5037, 'n', 'd', '9849', '5787', 'n', 'G', 10003], ['F', 5271, 'X', 'd', '9849', '5787', 'n', 'a', 'l', 1717, 4715]