Find unique elements based on a given key Input

Take a list of values xi each paired with a key yi. 

[(x1, y1), (x2, y2), ...]


Output

Return a list L containing only values from the set {xi}.


The length of L must be equal to the number of unique keys k in the set {yi}.
For each unique key k there must be a value from {xi} that has key k.


Details


Standard loopholes disallowed.
You can assume all values in the input will be nonnegative integers.
There may be duplicate values and keys.
You can assume there is at least one value/key pair in the input.
If you prefer to take two lists of equal length as input (one for values, one for keys) that is fine.
You may not take any other input.
The order of the list you output does not matter.
The xi you choose for each key does not matter.


For example, with input [[0, 0], [1, 3], [2, 3]] you can return either [0, 1] or [0, 2] or any permutation of these. 

Examples

[[1, 2], [3, 2], [3, 0]]  -&gt; [1, 3] or [3, 3]
[[7, 2], [7, 0], [7, 1]]  -&gt; [7, 7, 7]
[[4, 0], [4, 0], [9, 1], [5, 2]]  -&gt; [4, 9, 5]
[[9, 1], [99, 10], [5, 5], [0, 3]]  -&gt; [9, 99, 5, 0]


Fewest bytes wins.
Python 2, 34 bytes



lambda a,b:dict(zip(b,a)).values()


Try it online!

Takes input as list of values and list of keys.
Generate dictionary, swapping keys and values, which leaves only unique y values. Return all corresponding x values