In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['U', 8597, 4197, 'w', 'r', 7531, 'm', 'z', '1415', '3309', '3323', 'i', 'i', 'r', 'X', 5107, 7999], [6317, 'q', 'M', 'c', 'S', 'z', '1415', '3309', '3323', 'i', 'i', 'r', 'k', 579, 'Z']