You maintain a multiset of integers, each between 1 and maxValue. Write kthSmallest(maxValue, ops), where each operation is one of:
["add", x]: insert one copy of x["remove", x]: remove one copy of x; does nothing if x is not present["kth", k]: report the k-th smallest element (k = 1 is the smallest, equal values count separately), or -1 if the multiset has fewer than k elements
Return the answers to the "kth" operations, in order. Aim for O(log maxValue) per operation: sorting after every change is too slow.