In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['p', 'Q', 'R', 'o', '6005', 'N', 'v', '8617', 'z', 7175, 'i', 35], [8251, 4555, '6005', 'N', 'v', '8617', 'B', 4911, 1061, 135]