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: [535, 961, 's', 'o', 2929, '117', '5931', 'a', '8905', 'r', 'V', 'g', '1831', 'Y', 'y', '2435', '8571', 'b', 6665, 3909], ['h', 'X', 7909, 'Q', 8541, 5479, '117', '5931', 'a', '8905', 'r', 'V', 'g', '1831', 'Y', 'y', '2435', '8571', 'D', 'd', 9917, 'G', 'n', 6459]
A:
117, 5931, a, 8905, r, V, g, 1831, Y, y, 2435, 8571