In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.

['u', 1723, 5387, 8893, 'P', '6451', '7375', 'Z', 'h', 'P', 2185], [3319, 887, 's', 'U', 'P', '6451', '7375', 'Z', 9877, 4195, 'S']
P, 6451, 7375, Z