Given the task definition and input, reply with output. In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.

[2665, 'x', 'F', 'w', '4491', 'K', '1331', 'n', 'q', '5121', 'x', 'K', 'P', '3321', '7195', 'J', 'N', 'l', '9585', 'm', 'S', 'f', 'X', 7499], ['P', 'g', 843, 8525, 'c', 5099, 'x', 9287, 3327, 'G', 'J', 'r', 8201, 7165, 4151, 'w', '4491', 'K', '1331', 'n', 'q', '5121', 'x', 'K', 'P', '3321', '7195', 'J', 'N', 'l', '9585', 'm', 'S', 'f', 'j', 'A', 'q', 'H', 6073, 'O', 4765, 9947, 'P', 'H', 3025, 807, 'c', 'Q', 'w', 'K', 1007]
w, 4491, K, 1331, n, q, 5121, x, K, P, 3321, 7195, J, N, l, 9585, m, S, f