In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['w', 'z', 'M', 'G', '2769', 'l', 'P', '2335', '5451', 'l', 3863, 'Y'], [3629, 'U', 9685, '2769', 'l', 'P', '2335', '5451', 'w', 'd', 'S']