def adv_steer_submarine(instructions: list[tuple[str, int]]) -> int:
    """Steer the sub based on a list of instructions"""
    aim: int = 0
    hor_axis: int = 0
    depth: int = 0

    for instruction in instructions:
        match instruction[0]:
            case "up":
                aim -= instruction[1]
            case "down":
                aim += instruction[1]
            case "forward":
                hor_axis += instruction[1]
                depth += (aim * instruction[1])

    return hor_axis * depth