input: from typing import List
  
  
  def match_numeric_strings(strings: List[str]) -> List[str]:
      """Matches all numeric strings in the given list and returns only those strings.
  
      >>> match_numeric_strings(['123456789', 'abc123', '987654', 'hello'])
      ['123456789', '987654']
      >>> match_numeric_strings(['', '123', '456A'])
      ['123']
      """
      pattern = '^[0-9]+$'
      return [s for s in strings if re.match(pattern, s)]
output:     import re