public RandomListNode split(RandomListNode head) {
        RandomListNode ans = head.next;
        while (head != null) {
            RandomListNode temp = head.next.next;
            RandomListNode copy = head.next;
            head.next = copy.next;
            head = temp;
            if (temp != null) {
                copy.next = temp.next;
            }
        }
        return ans;
    }