In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[8095, 493, 'S', 'y', 'g', '3823', 'Y', '9997', 's', '4361', 'R', '2905', 'X', 'F', 'b', 'g', 4509, 'U', 'f', 'x'], ['o', 2397, 977, 'H', 'W', 'B', 'H', 'W', '3823', 'Y', '9997', 's', '4361', 'R', '2905', 'X', 'i', 'P', 7583, 'P', 'A']