Instructions: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [597, 2353, 'j', 4125, 2025, 'P', 'j', 2751, 'n', 8313, 'P', 799, 'F', 'k', 9487, 7991, 'H', 4829, 'p', 'j', 'd', 'M', 3007, 'l', 's', 'O', '8031', 'h', '4277', '2567', 't', '955', '1007', '3933', 'u', 'F', '2599', 'W', '1229', 'g', '1615', '915', '1761', '5977', 'S', '8415', 'P', '1373', 'c', 'N', 1389, 'n', 4619, 'r', 'V', 'i', 3097, 4401, 3537, 9703, 'U', 'e', 'j', 6273, 'M', 'J', 'v', 5367, 'E', 7533], [6269, 3917, 3971, 'k', 'T', 'O', 'H', 'l', 's', 'O', '8031', 'h', '4277', '2567', 't', '955', '1007', '3933', 'u', 'F', '2599', 'W', '1229', 'g', '1615', '915', '1761', '5977', 'S', '8415', 'P', '1373', 'c', 'a', 'G', 4871]
Output:
l, s, O, 8031, h, 4277, 2567, t, 955, 1007, 3933, u, F, 2599, W, 1229, g, 1615, 915, 1761, 5977, S, 8415, P, 1373, c