title: Find longest substring in alphabetical order
body: <p>I want to write a program that prints the longest substring in alphabetical order.</p>
  
  <p>And in case of ties, it prints the first substring.</p>
  
  <p>Here is what I wrote</p>
  
  <pre><code>import sys
  s1 = str(sys.argv[1])
  alpha = "abcdefghijklmnopqrstuvwxyz"
  
  def longest_substring(s1):
      for i in range(len(alpha)):
          for k in range(len(alpha)):
              if alpha[i:k] in s1:
                  return alpha[i:k]
  
  print("Longest substring in alphabetical order:", longest_substring(s1))
  </code></pre>
  
  <p>However, it does not work and I do not know how to do the second part.</p>
  
  <p>Can you help me, please?</p>