In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[641, 'p', '2377', '4521', '7671', 'g', '1955', 'S', 'D'], [1903, 7973, 6901, 8569, 1675, '2377', '4521', '7671', 'g', '1955', 'M', 'M', 'c']