In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[6225, 2461, 'r', 'l', 'a', 'y', '4367', '3837', '545', '5251', 'h', 'w', 'K', 'I'], [5505, 'd', 'r', 'r', 'l', 'a', 'y', '4367', '3837', '545', '5251', 'h', 'R', 'R', 'a', 8405, 3291, 'Z']