def status(level, solved, err):
    """Calculate status from status and err."""
    if solved:
        if err:
            status = 'multiple solution'
        else:
            status = 'level ' + str(level)
    elif err:
        status = 'no solution'
    else:
        status = 'give up'
    return status
