In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['K', 1261, 'K', 8071, 'h', 'u', '5083', '5943', 'X', 6837, 1655, 'D'], ['X', 'p', 'h', 'u', '5083', '5943', 'H', 'e', 'Z']