In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['v', 'f', '4373', '4823', '8615', '839', '1889', '1143', 'Z', '1737', 'h', '9583', 'O', 'S', 'w', 2707], [5947, 5051, 'J', 'x', 5177, '4373', '4823', '8615', '839', '1889', '1143', 'Z', '1737', 'h', '9583', 'O', 'Z', 793]