In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[8309, 'X', 8991, '9789', 'Y', '8423', 'q', 'c', 4913], [8045, 6597, '9789', 'Y', '8423', 'Y', 8631]