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: [867, 8735, 7493, 7143, 9187, 1945, 8251, 2937, 'd', 5617, 'P', 3467, 9491, '1479', '6405', '1399', 'k', '8735', '8433', '1231', 'n', '9907', 'p', '4499', 'B', '5061', 'C', 'm', 'K', 'R', 'k', 4757, 't', 'e', 'R', 3079, 6527, 7193, 7501, 'M'], ['g', 4571, 1917, 'W', 889, '1479', '6405', '1399', 'k', '8735', '8433', '1231', 'n', '9907', 'p', '4499', 'B', '5061', 'C', 'm', 'c', 'Q', 'P', 839, 'T', 1151, 4147, 's', 3805]
A:
1479, 6405, 1399, k, 8735, 8433, 1231, n, 9907, p, 4499, B, 5061, C, m