/** Tree node without parent pointer */
class Node<K extends Comparable<? super K>, V> {
	protected K key;
	protected V value;
	protected Node<K,V> left, right;

	public Node () {
	}
	
	public Node (K key, V value) {
		this.key = key;
		this.value = value;
	}
	
	public Node (Node<K,V> left, K key, V value, Node<K,V> right) {
		this(key, value);
		this.left = left;
		this.right = right;
	}

	public Node (Node<K,V> node) {
		this(node.left, node.key, node.value, node.right);
	}
}
