In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[5797, 'C', 139, 'p', 'L', '4079', '8747', '8999', 'J', 'P', 'D', '3711', 'k', '9077', 'h', 4389, 'T', 'J', 9637, 'l'], ['o', 'U', 1819, 'L', '4079', '8747', '8999', 'J', 'P', 'D', '3711', 'k', '9077', 'P', 'Y', 7561]