In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[799, 'D', 'T', 'd', 'c', '4713', '5959', 'r', 'B', 7545], [5857, 'm', 'd', 'c', '4713', '5959', 's', 'm']