input: 
  def simple_chatbot():
      """
      Implement a simple chatbot using state diagrams. The chatbot initializes at a start state ('state0') and moves between states based on user input.
      The chatbot will print messages corresponding to the current state and prompt the user for input. It will update its state based on the user's reply or ask the user to try again if the input is not recognized.
      The conversation ends when the chatbot reaches a terminal state (a state without any replies).
      >>> simple_chatbot()
      Hello! How can I help you?
      >> I need some advice
      Sure, what kind of advice do you need?
      >> Career advice
      It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.
      Goodbye!
      =========================
      Conversation:
      Hello! How can I help you?
      I need some advice
      Sure, what kind of advice do you need?
      Career advice
      It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.
      """
  
output:     state = 'state0'
      while True:
          if state == 'state0':
              print("Hello! How can I help you?")
              user_input = input(">> ").strip().lower()
              if 'advice' in user_input:
                  state = 'state1'
              else:
                  print("Sorry, I didn't understand that. Please try again.")
          elif state == 'state1':
              print("Sure, what kind of advice do you need?")
              user_input = input(">> ").strip().lower()
              if 'career' in user_input:
                  print("It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.")
                  print("Goodbye!")
                  break
              else:
                  print("Sorry, I didn't understand that. Please try again.")