Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [1989, 'a', 'R', 'b', 2035, 'G', 1617, 'B', 3727, 'z', 8577, 6933, 3305, 'a', 6645, 'I', 9779, 'z', 'K', 'b', 8957, 'g', 'y', 3639, '4705', '5351', '7439', 'W', '223', '609', 'X', 'g', '6321', '1779', 'W', 'Y', '395', 'F', 'W', '8495', '7007', 'h', 'M', 'h', 'v', '8613', 'U', '4541', '4071', 'x', 'G', 2043, 5643, 'q', 'u', 2207, 3349, 3551, 2799, 'x', 3281, 'X', 5261, 7347, 'x', 4819, 4301, 5239, 6743, 'e', 2791, 'a', 'd'], [4903, 1411, 4865, 's', 'S', 6595, 1367, 431, 'i', 3421, '4705', '5351', '7439', 'W', '223', '609', 'X', 'g', '6321', '1779', 'W', 'Y', '395', 'F', 'W', '8495', '7007', 'h', 'M', 'h', 'v', '8613', 'U', '4541', '4071', 'x', 'c', 'r', 'k', 'W', 2161, 'm', 'R', 'O', 'c', 'q', 3171, 2429, 'm']
Output:
4705, 5351, 7439, W, 223, 609, X, g, 6321, 1779, W, Y, 395, F, W, 8495, 7007, h, M, h, v, 8613, U, 4541, 4071, x