class Pair { T x; U y; public Pair() { } public Pair(T x, U y) { this.x = x; this.y = y; } public T fst () { return x; } public U snd () { return y; } }