In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Q: ['P', 5513, 2431, 7249, 'u', '599', 'f', '7915', '9165', '897', '6441', 'w', 'W', '1781', 'X', 'e', 'a', 'O'], [187, 'S', 'a', 9595, 8687, 'o', 5575, 'M', 'u', '599', 'f', '7915', '9165', '897', '6441', 'w', 'W', '1781', 'X', 'B', 'b']
A:
u, 599, f, 7915, 9165, 897, 6441, w, W, 1781, X