input: Write a function to find the longest word in a given sentence. If multiple words have the same length and are the longest, return the first one encountered. If the sentence is empty, return an empty string.
  
  def find_longest_word(sentence):
      words = sentence.split()
      if not words:
          return ""
      longest_word = words[0]
      for word in words:
          if len(word) > len(longest_word):
              longest_word = word
      return longest_word
  
  assert find_longest_word("The rain in Spain stays mainly in the plain.") == "mainly"
  assert find_longest_word("Python is an awesome programming language") == "programming"
  assert find_longest_word("") == ""
  assert find_longest_word("a bb ccc dddd") == "dddd"
  assert find_longest_word("one two three") == "three"
output: def find_longest_word(sentence):
      words = sentence.split()
      if not words:
          return ""
      longest_word = words[0]
      for word in words:
          if len(word) > len(longest_word):
              longest_word = word
      return longest_word