In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[5807, 'F', 1879, 4295, 'B', 'U', 'W', '6585', '9839', 'H', '1493', 'L', 'x', 'd', 7781], ['k', 'G', 1757, 'Y', 'p', 'W', '6585', '9839', 'H', '1493', 'L', 'x', 'S', 'V', 'p', 1127, 'p']