In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['F', 'P', 7877, 637, 'y', 9665, '2865', 'h', '4521', '3751', 'Q', 'D', '5177', '5581', '1923', 'i', 'u', 'M', 'q'], ['Z', 3231, 'Y', 'H', '2865', 'h', '4521', '3751', 'Q', 'D', '5177', '5581', '1923', 'i', 'u', 'P', 'g', 'F', 'I', 'n', 'b', 'g', 'M', 'b', 7823]