In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[3631, 'K', 'a', 'S', 'x', 'p', 'U', '4291', '523', '6815', 'w', 2245], [653, 1681, 'y', 'p', 'U', '4291', '523', '6815', 'S', 'q']