In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[2763, 3895, '3977', '7129', '9969', 'd', 'g', 'x'], ['S', 'F', 'h', 'n', '3977', '7129', '9969', 'd', 'U', 6471, 'U', 'P']