In this task, you are given two lists A,B. Find the longest common subsequence in the lists A and B.
[1227, 'c', 'c', '917', '4389', 'C', 'W', 6847, 5791], ['e', 'p', 'X', '917', '4389', 'C', 'z', 4397, 'B']