We sometimes want to compare two Pair objects, for example, when using pairs as keys in a tree map.
To compare two pairs, compare the first elements of each. If they are the same, compare the second elements.
For example, the pair (1, "Joe") comes before (2, "Jim") because the first element of the first pair is less. The pair (1, "Jim") comes before (1, "Joe") because the first elements are the same and the second element of the first pair is less.
Of course, it is required that the first and second element in the pair are comparable.
Your task is to implement the compareTo method, and to add suitable constraints to the generic types.