def adapters(text):
    """
    Parse lines of text into a list of adapters (represented by their joltage),
    supplemented by the outlet (0) and your device (maximum + 3).
    """
    adapters = list(sorted(map(int, text.splitlines())))
    adapters = [0] + adapters + [max(adapters) + 3]
    return adapters