Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [4771, 9249, 'e', 'I', 'S', 'M', 'I', 'c', 2909, 4349, 'Y', 853, 7269, 'J', 'K', 6261, 'u', 4033, 1461, 267, 'L', 'v', 7077, 'p', 'G', 1653, 9043, '1931', 'Z', '7569', 'Q', '1501', 'm', '1045', 'S', '6021', 'c', '2625', 'N', '8983', '5113', 'z', '3063', '7911', '4931', 'v', 'U', 'W', '1647', 'x', 'G', 'M', 'g', '6547', 'p', 6515], [5985, 'l', 'A', 'c', 6453, 'E', 'L', 3813, 459, 'x', 'W', 'Q', 'k', 'Z', 9437, 1025, 8425, 'u', 8337, '1931', 'Z', '7569', 'Q', '1501', 'm', '1045', 'S', '6021', 'c', '2625', 'N', '8983', '5113', 'z', '3063', '7911', '4931', 'v', 'U', 'W', '1647', 'x', 'G', 'M', 'g', '6547', 'b', 'l', 'D', 2559, 'E', 9561, 2719, 2815, 's']
Output:
1931, Z, 7569, Q, 1501, m, 1045, S, 6021, c, 2625, N, 8983, 5113, z, 3063, 7911, 4931, v, U, W, 1647, x, G, M, g, 6547