```python
def key_path(store: dict, head: str) -> list:
    if not store or head not in store:
        raise ValueError("Invalid input")
    
    return [name for name in store[head] if name != head]
```