Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [4631, 2559, 8315, 'q', 'N', 'a', 3963, 9941, 'S', 3867, 'q', 'D', 3395, 'R', 'O', 9905, 'A', 'B', 'w', '4697', 'v', '3421', 'x', '1231', 'd', '7741', '6605', 'K', 'c', '8039', '5899', '5515', '3733', '5771', '1563', '4067', 'R', 'i', 'K', '9757', 'y', '3467', 'M', 't', 'R', '3779', 'R', 'L', 'N', 'd', 7199, 9069, 'l', 4473], ['i', 'S', 5445, 'M', 4587, 2421, 'S', 7595, 3501, 8305, 't', 1789, 6545, '4697', 'v', '3421', 'x', '1231', 'd', '7741', '6605', 'K', 'c', '8039', '5899', '5515', '3733', '5771', '1563', '4067', 'R', 'i', 'K', '9757', 'y', '3467', 'M', 't', 'R', '3779', 'E', 5665, 'g', 'Z', 'W', 'F', 2893, 2397, 2009, 2609, 7071, 1349, 1261, 2377, 8063, 8779, 1517, 'v', 8753, 'I']
Output:
4697, v, 3421, x, 1231, d, 7741, 6605, K, c, 8039, 5899, 5515, 3733, 5771, 1563, 4067, R, i, K, 9757, y, 3467, M, t, R, 3779