class Ternary {

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Ternary)) {
            return false;
        }
        Ternary<?, ?, ?> that = (Ternary<?, ?, ?>)obj;
        return (t != null ? t.equals(that.t) : that.t == null) && (u != null ? u.equals(that.u) : that.u == null) && (v != null ? v.equals(that.v) : that.v == null);
    }

    public  Ternary(T t, U u, V v);

}