input: from typing import List
  
  
  def html_to_text(html_string: str) -> str:
      """ Convert HTML to plain text without using any libraries. The function works 
      by removing all HTML tags from the given string while preserving the text content.
      >>> html_to_text('<p>This is a <strong>test</strong> paragraph.</p>')
      'This is a test paragraph.'
      >>> html_to_text('<html><head><title>Title</title></head><body><h1>Heading</h1><p>Some text.</p></body></html>')
      'TitleHeadingSome text.'
      """
output:     import re
  
      def strip_tags(text):
          return re.sub(r'<[^>]+>', '', text)
  
      return strip_tags(html_string)