In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['g', 3141, 2441, 'y', 'p', 3635, 'S', '3697', '533', '4623', 'L', '9799', 'y', 'S', 'Y', 7607, 5069, 'O'], [7945, 'J', 7549, 6837, 'R', '3697', '533', '4623', 'L', '9799', 'y', 'S', 'Q', 'M', 'P']