code: def unsurt(surt):
      
  
      try:
          index = surt.index(')/')
          parts = surt[0:index].split(',')
          parts.reverse()
          host = '.'.join(parts)
          host += surt[index + 1:]
          return host
  
      except ValueError:
          # May not be a valid surt
          return surt
docs: # Simple surt
      >>> unsurt('com,example)/')
      'example.com/'
  
      # Broken surt
      >>> unsurt('com,example)')
      'com,example)'
  
      # Long surt
      >>> unsurt('suffix,domain,sub,subsub,another,subdomain)/path/file/\
  index.html?a=b?c=)/')
      'subdomain.another.subsub.sub.domain.suffix/path/file/index.html?a=b?c=)/'