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: ['n', 's', 'E', 'd', 7189, 4771, 3591, 1183, 2685, 7495, 2279, 7739, 6861, '5247', '3177', 'D', 'e', '2345', '951', 'A', '3429', 'K', '1987', 'v', 'y', 'q', '5739', '7367', 'y', 'A', 'y', 'W', '4307', 'g', '469', 'p', 'V', 375], ['p', 4519, 'x', 'q', 'E', 'E', 'b', 6695, 6351, 627, 2677, 'J', 9245, '5247', '3177', 'D', 'e', '2345', '951', 'A', '3429', 'K', '1987', 'v', 'y', 'q', '5739', '7367', 'y', 'A', 'y', 'W', '4307', 'g', '469', 'A', 1621, 9063, 7887, 'Y', 6109, 2719, 7727, 5829, 1977, 'a', 7055, 6863, 'Q', 6919, 4881]
A:
5247, 3177, D, e, 2345, 951, A, 3429, K, 1987, v, y, q, 5739, 7367, y, A, y, W, 4307, g, 469