':type head: ListNode
:rtype: ListNode'

def deleteDuplicates2(self, head):

    if (not head):
        return head
    if head.next:
        if (head.val == head.next.val):
            head = self.deleteDuplicates(head.next)
        else:
            head.next = self.deleteDuplicates(head.next)
    return head
