Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [6773, 3947, 'k', 4247, 'G', 1861, 9891, 'b', 'k', 'e', 'g', 'e', 'n', 165, 9627, 'x', 751, 'j', 849, 'M', 7503, 'j', '9669', '9267', 'd', '1205', '387', 'Q', 'r', '3903', 'M', '2281', '1931', '3103', 'D', '6789', '3655', '9431', '9505', '8829', 'O', 'r', '2177', 'J', 'J', 'u', 5677, 'j'], ['r', 'A', 'G', 6991, 7991, 2979, 2857, 2387, 7761, 3883, 'N', 'X', 'F', 'j', '9669', '9267', 'd', '1205', '387', 'Q', 'r', '3903', 'M', '2281', '1931', '3103', 'D', '6789', '3655', '9431', '9505', '8829', 'O', 'r', '2177', 'J', 's', 'y', 'F', 'W', 'D', 'T', 7167, 1897, 'M', 'V', 4459]
Output:
j, 9669, 9267, d, 1205, 387, Q, r, 3903, M, 2281, 1931, 3103, D, 6789, 3655, 9431, 9505, 8829, O, r, 2177, J