Input: operations = [["push",5],["push",7],["push",5],["push",7],["push",4],["push",5],["pop"],["pop"],["pop"],["pop"]]
Output: [null,null,null,null,null,null,5,7,5,4]
Explanation: After all pushes, 5 has freq 3, 7 has freq 2, 4 has freq 1. Pop returns 5 (most frequent), then 7 (freq 2, most recent), then 5, then 4.