Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [7965, 'I', 'D', 'T', 's', 'm', 8793, 2199, 'P', 977, 'w', 5699, 5675, 2819, 6757, 7297, 'h', 'U', 'C', 4325, 'j', 'U', '2935', '7249', '5431', '6891', 'Y', 'E', 'w', 'B', '3371', 'H', 'B', '2131', 'H', '2609', 'H', 'p', 's', 'e', 'B', 'n', 'B', 'S', 'E', 'o', 'a'], [9471, 'v', 'B', 5787, 3245, 8095, 'R', 1419, 1767, 'p', 281, 'l', 2253, 8709, 267, 4465, 'P', '2935', '7249', '5431', '6891', 'Y', 'E', 'w', 'B', '3371', 'H', 'B', '2131', 'H', '2609', 'H', 'p', 's', 'e', 'B', 'n', 'B', 'S', 'E', 'v', 'h', 9811, 'r', 'D', 's', 9337, 6015, 'e', 3355, 'o', 3101, 'U', 'U', 'Y', 2123, 9383, 'h', 8679, 'n', 'n', 6973, 'g']
Output:
2935, 7249, 5431, 6891, Y, E, w, B, 3371, H, B, 2131, H, 2609, H, p, s, e, B, n, B, S, E