public static ListNode swapPairs(ListNode head) {
        ListNode h = null;
        ListNode p = head;
        ListNode q = head;
        ListNode l = null;
        while (null != p) {
        	q = p.next;
        	if (null != q) {
        		p.next = q.next;
        		q.next = p;
        		if (null == h) h = q;
        		if (null != l) l.next = q;
        		l = p;
        		p = p.next;
        	} else {
        		if (null == h) h = head;
        		break;
        	}
        }
    	return h;
    }