public ListNode deleteDuplicates(ListNode head) {
		if (head == null || head.next == null)
			return head;
		ListNode first = head, second = head.next;
		while (second != null) {
			boolean duplicate = false;
			while (first.val == second.val) {
				second = second.next;
				duplicate = true;
			}
			if (duplicate)
				first.next = second;
			first = first.next;
			if (second != null)
				second = second.next;
		}
		return head;
	}