In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['t', 'w', 'Y', 'G', '4073', '2999', 'q', 1629, 'H'], ['J', 'S', 'M', 's', 'Y', 'G', '4073', '2999', 'a', 'G', 7213, 5951]