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

Input: Consider Input: [5225, 'L', 1023, 8623, 'k', 'f', '1481', 'e', 'm', '4013', 'l', '831', 'n', '3137', 'b', 517], [1243, 't', '1481', 'e', 'm', '4013', 'l', '831', 'n', '3137', 'x', 5545, 's', 'a']

Output: 1481, e, m, 4013, l, 831, n, 3137

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: ['t', 'f', 3791, 2099, '3895', '5725', '7743', '9219', 'c', '6319', '3099', '3601', 'a', '2943', '2543', '51', 'r', 'w', '2379', '5423', '5807', 'l', 'b', 'f', 'i', 2371, 'W', 'c', 'c', 'l', 5505, 'L', 'w', 'a'], ['s', 5505, 'h', 4601, 4713, 6191, 't', 9213, 'D', 1777, 'E', '3895', '5725', '7743', '9219', 'c', '6319', '3099', '3601', 'a', '2943', '2543', '51', 'r', 'w', '2379', '5423', '5807', 'l', 'v', 5275, 'C', 'Y', 3371, 7105, 411, 'f', 8409]
Output: 3895, 5725, 7743, 9219, c, 6319, 3099, 3601, a, 2943, 2543, 51, r, w, 2379, 5423, 5807, l