new_contents: # Definition for singly-linked list.
  # class ListNode(object):
  #     def __init__(self, x):
  #         self.val = x
  #         self.next = None
  
  class Solution(object):
      def deleteDuplicates(self, head):
          """
          :type head: ListNode
          :rtype: ListNode
          """
          if not (head and head.next):
              return head
              
          cur = head
          while cur:
              while cur.next and cur.val == cur.next.val:
                  cur.next = cur.next.next
              
              cur = cur.next
              
          return head
  
subject: add remove-duplicates-from-s