import java.util.*;

public class Pair<T, U> {
	T a;
	U b;
	
	public Pair() { }
	public Pair(T a, U b) {
	    System.out.println("Pair a; " + a + " b: " + b);
		this.a = a;
		this.b = b;
	}
	
	public T fst () {
		return a;
	}
	 
	public U snd () {
	    System.out.println("snd b: " + b);
	    return b;
	}

    public String toString() {
	return "Pair<"+a.toString()+","+b.toString()+">";
    }
}

