In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['U', 'k', 7845, 7399, 'y', '4977', 't', 'S', 'f', '5091', '4051', 'z', 'N', 8659, 'M'], [8975, 311, 'z', 433, 7939, 2743, 8009, 2137, 'y', '4977', 't', 'S', 'f', '5091', '4051', 'z', 'M', 1299, 'E', 295, 'k', 5315]