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.

[585, 7, 5599, 1363, 'h', 's', 'Z', '2985', '3723', 'g', '8737', 'k', '7989', '6461', 'G', 8841], [6351, 'V', 'Q', 'Z', '2985', '3723', 'g', '8737', 'k', '7989', '6461', 'X', 'h', 'b']
Z, 2985, 3723, g, 8737, k, 7989, 6461