In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[1877, 2031, 'z', '2859', 'M', 'P', '6057', 'Y', 'N', 'Z'], ['D', 7859, 3709, '2859', 'M', 'P', '6057', 'Y', 's', 2073, 'E', 4977, 'Q']