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: ['M', 't', 'N', 8961, 7157, 'd', 'b', 9055, 'a', '8231', 'A', '707', '1361', '4643', 'u', '5249', 'W', 'k', 2289, 1437, 'J', 'm', 9315], [9879, 'v', 8035, 6263, 8993, 3945, 'a', 'a', '8231', 'A', '707', '1361', '4643', 'u', '5249', 'c', 161]
A:
a, 8231, A, 707, 1361, 4643, u, 5249