In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[8559, 7787, 'S', 977, 'z', 7679, 2317, 'U', 'r', 'F', 'Z', '1287', '787', 'n', '5523', 's', 5325], [4779, 'V', 'y', 4807, 'h', 7279, 6247, 'U', 'r', 'F', 'Z', '1287', '787', 'n', '5523', 'i', 'W', 505, 'S', 3877, 't', 'M', 8463]