Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: ['p', 'N', 6845, 'y', 2721, 8063, 3415, 'g', 'E', 7641, 3985, 'z', 'N', 'h', 'q', 'A', 'w', '1681', '687', 'T', '211', 'Y', 'u', '9179', '4937', 'r', 't', '3041', 'P', '527', 'Q', 'o', '3793', '9721', '4953', 'o', 'I', '8437', '969', 'R', 'L', 5353, 629, 7949, 'Y', 8085, 'n', 5391, 'P', 'A', 'u', 'g'], [4303, 'x', 'H', 7663, 'R', 3325, 9101, 9833, 5327, 'z', 6843, 'T', 4619, 'S', 'H', 't', 7139, 8849, 1163, 1495, 'k', 'W', 4403, 'B', 'N', 4065, 'J', 'N', 'h', 'q', 'A', 'w', '1681', '687', 'T', '211', 'Y', 'u', '9179', '4937', 'r', 't', '3041', 'P', '527', 'Q', 'o', '3793', '9721', '4953', 'o', 'I', '8437', '969', 'R', 'S', 'c', 'q']
Output:
N, h, q, A, w, 1681, 687, T, 211, Y, u, 9179, 4937, r, t, 3041, P, 527, Q, o, 3793, 9721, 4953, o, I, 8437, 969, R