Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: ['n', 'x', 9871, 'Y', 'i', 'H', 'M', 'O', 'Y', 'a', 9141, 1401, 'G', 4163, 3359, 'w', 7039, 'n', '1281', '8709', '2635', 'V', '6799', '9131', 'n', '5299', 'r', '4925', '2033', '4435', '733', 'O', 'B', 'G', 'K', '813', 'c', 'D', '2095', 'S', '9259', '9363', '8215', 'R', 'p', '1267', '3479', 't', 983, 7991, 4803, 'r', 579, 'k', 'h', 'g', 4317, 5229, 'L', 5343, 'R', 'P', 'D'], [9731, 'N', '1281', '8709', '2635', 'V', '6799', '9131', 'n', '5299', 'r', '4925', '2033', '4435', '733', 'O', 'B', 'G', 'K', '813', 'c', 'D', '2095', 'S', '9259', '9363', '8215', 'R', 'p', '1267', '3479', 'h', 'i', 'h', 'd', 67, 'F', 2199, 189, 5033, 9307, 'W', 701, 'I', 3607, 23, 9055, 49, 'r', 'l', 'I', 4903, 8901, 'y', 25, 2761]
Output:
1281, 8709, 2635, V, 6799, 9131, n, 5299, r, 4925, 2033, 4435, 733, O, B, G, K, 813, c, D, 2095, S, 9259, 9363, 8215, R, p, 1267, 3479