input: Write a python function to create a basic chatbot that responds to greetings and questions. Use the nltk library for tokenization and part-of-speech tagging.
  ```python
  def chatbot_response(input):
      import nltk
      words = nltk.word_tokenize(input)
      words_tagged = nltk.pos_tag(words)
      greeting_response = 'Hi there! How can I help you?'
      
      if words_tagged[1][1] == "WP":
          return 'I am sorry, I can not answer this question.'
      
      if words_tagged[0][1] == 'UH':
          return greeting_response
  
      return 'Sorry, I do not understand.'
  
  assert chatbot_response('Hello, how are you?') == 'Hi there! How can I help you?'
  assert chatbot_response('What is your name?') == 'I am sorry, I can not answer this question.'
  assert chatbot_response('Goodbye!') == 'Sorry, I do not understand.'
output: from nltk.corpus import wordnet as wn
      nltk.download('averaged_perceptron_tagger')
      nltk.download('punkt')
      
      words = nltk.word_tokenize(input)
      words_tagged = nltk.pos_tag(words)
      greeting_response = 'Hi there! How can I help you?'
      
      for word, tag in words_tagged:
          if tag == "WP":
              return 'I am sorry, I can not answer this question.'
          elif tag in ["UH", "NN"]:
              if wn.synsets(word, pos=wn.NOUN):
                  return greeting_response
  
      return 'Sorry, I do not understand.'