public void swap(GNode node1,GNode node2){
		GNode[] children;
		GNode parent;
		int size1,size2,dsize;
		parent=node1.parent;
		if (parent==null){
			root=node2;
		}else{
			children=parent.children;
			size1=node1.size;
			size2=node2.size;
			for (int i=0;i<children.length;i++){
				GNode child=children[i];
				if (child!=node1)
					continue;
				children[i]=node2;
			}
			
			dsize=size2-size1;
			while(parent!=null){
				parent.size+=dsize;
				parent=parent.parent;
			}
		}
	}