Definition: In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
Input: ['W', 'A', '5747', 'i', 'M', 'N', 8861], [1997, 'D', 5205, '5747', 'i', 'M', 'D', 3319, 1895]
Output:

Show your work and conclude with the exact phrasing "Therefore, the final answer is [answer]." where [answer] is just the final number or expression that solves the problem.
user
5747, i, M