def get_inputs( filename ):
    """
    The input notes consists of two lines. 
    Line 1 - estimate of earliest timestamp of departure
    Line 2 - bus IDs in service, where 'x' = out of service
    This function returns a dict with the time, buses in service and their offsets
    """
    with open( filename, 'r' ) as input_file:
        raw_data = input_file.read().splitlines()
    time   = int(raw_data[0])
    buses  = [ int(item) for item in raw_data[1].split(',') if item != 'x']
    offsets = [ raw_data[1].split(',').index( str(item) ) for item in buses ]
    return { 'time': time, 'buses': buses, 'offsets': offsets }