In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[631, 'u', 'V', '3839', 'v', 'v', 't', 'F', 'h', 'J'], ['F', 'c', 'u', 3605, 'X', '3839', 'v', 'v', 't', 'F', 'g', 6171, 3371]