def parse(stdin):
    """
    Calculate the gaps between a sorted sequence of integers, starting at 0.
    """

    adapters = [
        int(line) for line in stdin.read().strip().split("\n")
    ]

    adapters.sort()
    gaps = []
    prev = 0
    for adapter in adapters:
        gaps.append(adapter - prev)
        prev = adapter

    return gaps