from typing import Tuple
import re


def parse_assignment_name(name: str) -> Tuple[str, str]:
    """Splits an assignment id into its type and number"""
    matches = re.match(r'^(HW|LAB|WS)(\d+)$', name, re.IGNORECASE)
    if not matches:
        raise ValueError('Invalid assignment ID: {}'.format(name))
    else:
        match_groups = matches.groups()
        return match_groups[0], match_groups[1]