```python
def fill_template(template:    values):
    if not isinstance(template, str):
        raise ValueError("fill_template expects a string template")
    
    result = []
    i = 0
    while i < len(template):
        if template[i(i,            result.append(template[i(i))
            i +=            continue
        
        if i + 1 < len(template) and template[i] == '{' and template[i + 1):
            j =            k):
                if j >= len(template) or template[j]:
                    raise ValueError("Unterminated placeholder")
                
                if not template[j].isalnum() and template[j]:
                    raise ValueError("Invalid placeholder name")
                
                j +=                1):
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot end with underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain consecutive underscores")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot start with digit")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot end with digit"):
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain leading underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain trailing underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain multiple consecutive underscores")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot start with digit")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot end with digit")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain leading underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain trailing underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain multiple consecutive underscores")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot start with digit")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot end with digit")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain leading underscore")
            
            if j + 1 < len(template) and template[j + 1):
                raise ValueError("Placeholder name cannot contain trailing underscore")
            
            if j + 1 < len(template)                raise ValueError("Placeholder name cannot contain multiple consecutive underscores")
            
            if j + 1 < len(template):
                raise ValueError("Placeholder name cannot start with digit")
            
            if j + 1 < len(template):
                raise ValueError("Placeholder name cannot end with digit")
            
            if j +                 raise ValueError("Placeholder name cannot contain leading underscore")
            
            if j:
                raise ValueError("Placeholder name cannot contain trailing underscore")
            
            if j:
                raise ValueError("Placeholder name cannot contain multiple consecutive underscores")
            
            if j:
                raise ValueError("Placeholder name cannot start with digit")
            
            if j:
                raise ValueError("Placeholder name cannot end with digit")
            
            if j:
               