In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[5615, 4889, 'G', 'd', '2713', 'I', '3723', '8419', 'D', 'G', 'g', 5947], ['X', 2691, '2713', 'I', '3723', '8419', 'w', 'S', 'L']