from pathlib import Path
from typing import List


def list_joltage_steps(file: Path) -> List[int]:
    """
    List joltages from the given file

    :param file: file containing the input values
    :return: list of joltage steps
    """

    adapter_output_joltages = sorted([int(v) for v in open(file)])
    device_input_joltage = 3 + max(adapter_output_joltages)
    joltages = [0] + adapter_output_joltages + [device_input_joltage]
    pairs = list(zip(joltages[:-1], joltages[1:]))
    joltage_steps = [p[1] - p[0] for p in pairs]

    return joltage_steps