In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.

Example input: [5797, 8817, '8297', 'b', 'U', 'b'], [5843, 8809, '8297', 'b', 'W', 'C']
Example output: 8297, b
Example explanation: 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: [9487, 'W', 6879, 5217, 'B', 7195, 3359, 2801, 6433, 's', 1169, 'h', '6065', 'J', 'u', '7303', '1631', '37', '6199', 'J', '6871', '9749', 'P', '4827', '5077', 'L', 'e', 'y', 8515, 'g', 'e', 'u', 'l', 9535], [7969, 'c', 'A', 3311, 'J', 6327, 2135, 6741, 7589, 'X', 'j', 789, '6065', 'J', 'u', '7303', '1631', '37', '6199', 'J', '6871', '9749', 'P', '4827', '5077', 'T', 7723, 'D', 'i', 'Y', 5287, 889, 'W', 'W']
A:
6065, J, u, 7303, 1631, 37, 6199, J, 6871, 9749, P, 4827, 5077