Instructions: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: [8997, 'h', '3777', '7761', 't', '4573', 't', 'Y', '7647', 'P', 'w', '5873', '7123', 'Q', 'l', '1487', 'U', 'K', 'B', '5109', 'd', 'D', 'm', '7185', 'p', '9613', 'F', '9665', '4785', 'E', '8989', '5303', 'r', 2927, 'L', 'd', 6709, 5407, 'M', 'Z', 8839, 'Q', 'a', 'h', 8633, 'n', 'H', 607, 4051, 'i', 'i', 'G'], [911, 's', 'Q', 5775, 'e', 5479, 'S', '3777', '7761', 't', '4573', 't', 'Y', '7647', 'P', 'w', '5873', '7123', 'Q', 'l', '1487', 'U', 'K', 'B', '5109', 'd', 'D', 'm', '7185', 'p', '9613', 'F', '9665', '4785', 'E', '8989', '5303', 'F', 'I', 'j', 7815, 5805, 9473, 4185, 'c', 6807, 181, 8557, 5715, 'i', 2245, 463, 'S', 6191, 7353, 'H', 6237, 'h', 9103, 9033, 'Q', 6373, 'x', 'C', 'i', 4039]
Output:
3777, 7761, t, 4573, t, Y, 7647, P, w, 5873, 7123, Q, l, 1487, U, K, B, 5109, d, D, m, 7185, p, 9613, F, 9665, 4785, E, 8989, 5303