Format a string representing the kinds.

def format_kinds(raw):
    """Format a string representing the kinds."""
    output = ' '.join('{} {}'.format(*kind) for kind in raw if kind)
    return output