text: # Reverse words in a string
  # http://rosettacode.org/wiki/Reverse_words_in_a_string
  
  
  def main():
      with open(file="reverse_words.txt", mode="r", encoding="utf-8") as f:
          lines: list[str] = []
          for line in f:
              lines.append(process_line(line.strip()))
          for line in lines:
              print(line)
  
  
  def process_line(line: str) -> str:
      return " ".join(line.split()[::-1])
  
  
  if __name__ == "__main__":
      main()
  