In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['m', 'D', 6951, 411, '6313', 'h', 'W', '5823', 'D', 'm'], ['w', 5823, '6313', 'h', 'W', '5823', 'J', 'O']