def sexpr_print_sexpr(sexpr):
    """Prints a python S-expression as a string S-expression."""
    if isinstance(sexpr, str):
        return sexpr
    elif isinstance(sexpr, int):
        return str(sexpr)
    elif isinstance(sexpr, tuple):
        assert len(sexpr) > 1, sexpr
        parts = map(sexpr_print_sexpr, sexpr)
        return '({})'.format(' '.join(parts))
    else:
        raise ValueError(sexpr)