public RandomListNode copyRandomList(RandomListNode head) {
    	if(head == null) return null;
    	
    	RandomListNode curr = head;
    	while(curr!=null)
    	{
    		RandomListNode newnode = new RandomListNode(curr.label);
    		newnode.next = curr.next;
    		newnode.random = curr.random;
    		curr.next = newnode;
    		curr = newnode.next;
    	}
    	
    	curr = head.next;
    	while(curr!=null)
    	{
    		if(curr.random!=null)
    			curr.random = curr.random.next;
    		
    		if(curr.next!=null)
    			curr = curr.next.next;
    		else
    			curr = null;
    	}
    	
    	RandomListNode copyHead = new RandomListNode(-1);
    	RandomListNode copyCur = copyHead;
    	RandomListNode srcHead = new RandomListNode(-1);
    	RandomListNode srcCur = srcHead;

    	curr = head;
    	while(curr!=null && curr.next!= null)
    	{
    		srcCur.next = curr;
    		copyCur.next = curr.next;
    		
    		srcCur =srcCur.next;
    		copyCur = copyCur.next;
    		
    		curr.next = curr.next.next;
    		curr = curr.next;
    	}
    	
    	head = srcHead.next;
        return copyHead.next;
    }