def trip2str(trip):
    """ Pretty-printing. """
    header = '{} {} {} - {}:'.format(trip['departureTime'], trip[
        'departureDate'], trip['origin'], trip['destination'])
    output = [header]
    for subtrip in trip['trip']:
        originstr = u'{}....{}'.format(subtrip['departureTime'], subtrip[
            'origin'])
        output.append(originstr)
        for subsubtrip in subtrip['trip']:
            t = subsubtrip['arrivalTime']
            d = subsubtrip['stop']
            intermediatestr = t + u'.' * 8 + d
            output.append(intermediatestr)
        destinationstr = u'{}....{}'.format(subtrip['arrivalTime'], subtrip
            ['destination'])
        output.append(destinationstr)
    return '\n'.join(output)
