In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
One example is below.
Q: [5797, 8817, '8297', 'b', 'U', 'b'], [5843, 8809, '8297', 'b', 'W', 'C']
A: 8297, b
Rationale: Here, '8297, b' is the longest common subsequence in both the input lists [5797, 8817, '8297', 'b', 'U', 'b'] and [5843, 8809, '8297', 'b', 'W', 'C'].
Q: [1389, 'K', 'Z', 8709, 8923, 'r', 3717, 'e', 'c', 'Q', 'm', 2831, 'r', 'X', 5943, 143, 1691, 1935, 'i', 551, 'A', 'B', 6641, 7079, 'y', 7039, '5069', 't', '4873', 'd', '987', '4935', 'i', '8575', '8323', 'x', 'z', 'n', 'Y', 'N', 'e', '189', 'D', 'P', '3635', 'd', '3309', '7873', '1845', '5429', '3247', 'O', 'm', 'P', 'C', 'r', 7505, 'w', 6257, 'r', 'b', 'p', 3903, 'R', 8391, 3087, 9555], [5333, 7817, 'x', 'c', '5069', 't', '4873', 'd', '987', '4935', 'i', '8575', '8323', 'x', 'z', 'n', 'Y', 'N', 'e', '189', 'D', 'P', '3635', 'd', '3309', '7873', '1845', '5429', '3247', 'O', 'm', 'P', 'B', 4981, 7267, 'm', 'F', 4917, 5373, 9839, 'K', 1841, 2781, 2923, 6953, 'c', 8513, 9329, 'h', 6527, 'D', 3597, 'n', 'S', 'k', 'T', 8949, 3329, 2035]
A:
5069, t, 4873, d, 987, 4935, i, 8575, 8323, x, z, n, Y, N, e, 189, D, P, 3635, d, 3309, 7873, 1845, 5429, 3247, O, m, P