input: Write a python function to add and retrieve messages from MessageStore.
  assert __name__ == "__main__":
      msg1 = Message("Hello", "Alice", "Bob", "Hi Bob, How are you?")
      msg2 = Message("Meeting", "Carol", "Dave", "Meeting at 10 AM")
      store = MessageStore([])
  
      store.addMessage(msg1)
      store.addMessage(msg2)
      
      assert store.getMessage(1).subject == "Hello"
      assert store.getMessage(1).sender == "Alice"
      assert store.getMessage(1).receiver == "Bob"
      assert store.getMessage(1).body == "Hi Bob, How are you?"
  
      assert store.getMessage(2).subject == "Meeting"
      assert store.getMessage(2).sender == "Carol"
      assert store.getMessage(2).receiver == "Dave"
      assert store.getMessage(2).body == "Meeting at 10 AM"
  
      assert store.getMessage(3) == None
output: class Message:
      def __init__(self, subject, sender, receiver, body):
          self.subject = subject
          self.sender = sender
          self.receiver = receiver
          self.body = body
  
  class MessageStore:
      def __init__(self, messages):
          self.messages = messages
  
      def addMessage(self, message):
          self.messages.append(message)
  
      def getMessage(self, index):
          if 0 < index <= len(self.messages):
              return self.messages[index - 1]
          else:
              return None
  
  if __name__ == "__main__":
      msg1 = Message("Hello", "Alice", "Bob", "Hi Bob, How are you?")
      msg2 = Message("Meeting", "Carol", "Dave", "Meeting at 10 AM")
      store = MessageStore([])
  
      store.addMessage(msg1)
      store.addMessage(msg2)
      
      assert store.getMessage(1).subject == "Hello"
      assert store.getMessage(1).sender == "Alice"
      assert store.getMessage(1).receiver == "Bob"
      assert store.getMessage(1).body == "Hi Bob, How are you?"
  
      assert store.getMessage(2).subject == "Meeting"
      assert store.getMessage(2).sender == "Carol"
      assert store.getMessage(2).receiver == "Dave"
      assert store.getMessage(2).body == "Meeting at 10 AM"
  
      assert store.getMessage(3) == None