input: from typing import Optional
  
  class HashTable:
      """Implements a hash table that supports insert, delete and retrieve operations.
      >>> ht = HashTable()
      >>> ht.insert("key1", "value1")
      >>> ht.retrieve("key1")
      'value1'
      >>> ht.delete("key1")
      >>> ht.retrieve("key1")
      """
      def __init__(self):
          self.table = [[] for _ in range(256)]
   
      def insert(self, key, value):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  self.table[h][i] = (key, value)
                  return
          self.table[h].append((key, value))
   
      def retrieve(self, key) -> Optional[str]:
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return kv[1]
   
      def delete(self, key):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  del self.table[h][i]
output:         return