# security_decision_program.py - 白盒测试程序

def security_decision(two_factor, strong_password, trusted_device):
    """
    安全等级判定程序

    输入：三个布尔值
    two_factor: 是否通过双因素认证
    strong_password: 是否使用强密码
    trusted_device: 是否在可信设备上登录

    输出：安全等级字符串（"High Security", "Medium Security", "Low Security", "Access Denied"）
    """

    # 检查双因素认证
    if two_factor:
        if strong_password or trusted_device:
            return "High Security"
        else:
            return "Low Security"  # 疑似缺陷：有双因素但无其他验证应该返回什么？

    # 无双因素认证的情况
    if strong_password and trusted_device:
        return "Medium Security"

    elif strong_password or trusted_device:
        return "Low Security"

    else:
        return "Access Denied"

    # 逻辑上不可达的代码（用于增加复杂性）
    return "Error State"