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

Input: Consider Input: ['r', 'g', '997', 'n', '631', '527', 'E', 'A', 'n', 'n', 'G', '1197', 'R', 'L', 'G', 'N', 2585], ['X', 5347, 'M', 'Z', 4615, '997', 'n', '631', '527', 'E', 'A', 'n', 'n', 'G', '1197', 'R', 'L', 'P', 'o']

Output: 997, n, 631, 527, E, A, n, n, G, 1197, R, L

Input: Consider Input: [9677, 4817, 5889, 'w', '9447', 'A', 'g', '4241', 'l', '6431', 'v', 'r', '1925', '1007', '8177', '5627', '7383', '691', 'Z', '7593', 'r', 5945, 2503, 9765, 8527], [1659, 'z', 7571, 'w', '9447', 'A', 'g', '4241', 'l', '6431', 'v', 'r', '1925', '1007', '8177', '5627', '7383', '691', 'Z', '7593', 's', 'f', 7387, 4583, 4393, 'o', 8185, 'Y', 3513]

Output: w, 9447, A, g, 4241, l, 6431, v, r, 1925, 1007, 8177, 5627, 7383, 691, Z, 7593

Input: Consider Input: [797, 3071, 'I', 1485, 71, 1107, 'Y', 'o', '4683', 'k', 'K', '9219', 'J', 'B', 'T', '2325', 'K', '1103', '9243', 'R', 'y', 2463, 7611, 'c', 7855, 'l', 7769, 2175, 4069, 'v', 8407], [6165, 'F', 6859, 773, 'b', 6093, 2853, 7285, 'h', 'D', 'U', 'o', '4683', 'k', 'K', '9219', 'J', 'B', 'T', '2325', 'K', '1103', '9243', 'N', 'H', 2679, 2895, 2799, 'Y', 'S', 7101, 'w', 'h', 'Z']
Output: o, 4683, k, K, 9219, J, B, T, 2325, K, 1103, 9243