input: from typing import Dict, List
  
  def chatbot(init_state: Dict) -> List[str]:
      """ Create a simple chatbot using state diagrams and return the conversation history.
      Each state is a dictionary with 'name', 'message', and 'replies' keys. 
      The 'name' key holds the state's name as a string, the 'message' key holds 
      the message the chatbot will display at this state, and the 'replies' key 
      is another dictionary where the keys are possible user inputs and the 
      values are the next states. The chatbot will prompt the user for inputs and 
      transition between states based on the user's responses. The conversation 
      will end when the current state's 'replies' dictionary is empty, which 
      indicates a terminal state.
      
      >>> state0 = {'name': 'state0', 'message': 'Hello! How can I help you?', 'replies': {'I need some advice': 'state1', 'Can you answer my questions?': 'state2'}}
      >>> state1 = {'name': 'state1', 'message': 'Sure, what kind of advice do you need?', 'replies': {'Career advice': 'state3','Health advice': 'state4'}}
      >>> state2 = {'name': 'state2', 'message': 'Yes, I\'ll do my best! What do you want to know?', 'replies': {'Where can I find good tutorials': 'state5', 'Why is coding so hard': 'state6'}}
      >>> state3 = {'name': 'state3', 'message': '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.', 'replies': {}}
      >>> state4 = {'name': 'state4', 'message': 'Focus on eating healthy and staying active. Make sure to consult a medical professional if you have any concerns.', 'replies': {}}
      >>> state5 = {'name': 'state5', 'message': 'You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.', 'replies': {}}
      >>> state6 = {'name': 'state6', 'message': 'Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.', 'replies': {}}
      >>> chatbot(state0)
      ['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:     conversation = []
      current_state = init_state
      
      while current_state['replies']:
          conversation.append(current_state['message'])
          user_input = input(current_state['message'] + " ")
          conversation.append(user_input)
          next_state_name = current_state['replies'].get(user_input)
          if next_state_name:
              current_state = globals()[next_state_name]
          else:
              break
      
      conversation.append(current_state['message'])
      return conversation