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

Q: [605, 'W', 7189, 'X', '7897', '5823', 'P', '9001', 'J', 'r', 2595], ['z', 'W', '7897', '5823', 'P', '9001', 'J', 'Z', 'w']

A: 7897, 5823, P, 9001, J
****
Q: ['i', 4077, 'Z', 6231, 2337, 'h', '1181', '1631', '2605', '587', '1477', '2707', 'R', 'O', 'd', 1355, 'n'], [505, 'A', 8789, 75, 'q', 'h', '1181', '1631', '2605', '587', '1477', '2707', 'R', 'O', 'e', 'r', 'I', 'm', 1525, 3577]

A: h, 1181, 1631, 2605, 587, 1477, 2707, R, O
****
Q: [1971, 'u', '5895', '1971', 'S', 'k'], [3813, 'Z', '5895', '1971', 'w', 9411]

A:
5895, 1971
****