input: 
  from typing import Dict, Any
  
  class Blockchain:
      def __init__(self):
          self.chain = []
  
      def add_block(self, data: Dict[str, Any]):
          previous_hash = self.chain[-1].hash if len(self.chain) > 0 else None
          block = Block(len(self.chain), data['timestamp'], data['data'], previous_hash)
          self.chain.append(block)
  
      def get_chain(self) -> str:
          return json.dumps([b.__dict__ for b in self.chain], indent=2)
  
  # Example usage:
  # b = Blockchain()
  # b.add_block({'timestamp': '2022-10-10', 'data': 'First Block'})
  # print(b.get_chain())
  
output:     
  import json
  
  class Block:
      def __init__(self, index: int, timestamp: str, data: Any, previous_hash: str):
          self.index = index
          self.timestamp = timestamp
          self.data = data
          self.previous_hash = previous_hash
          self.hash = self.calculate_hash()
  
      def calculate_hash(self) -> str:
          block_string = json.dumps(self.__dict__, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()
  