In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
['a', 'l', 2975, 4779, 6787, 5031, 'd', 'c', 'y', 'M', '1795', '6857', '6487', 'h', 8995, 'D', 'J'], ['U', 'K', 'x', 1175, 'P', 'd', 'c', 'y', 'M', '1795', '6857', '6487', 'F', 'u', 2675, 4959]