This is designed to test your prog2. Fair warning, it is pretty fragile.
Make a matching inputXXX.txt and outputXXX.txt
Invoke the driver with python3 like so:
python3 driver.py XXX
The input will be processed line by line and fed to prog2. Put a newline when it is time to wait for output. That empty line won't be sent to prog2. It's just there to signal to the driver to wait. I have included the test I put on Piazza. Please make your own.
Note 1: I made the output file support extraneous newlines and comments. this was because I accidentally tested with an extra space.
Note 2: my prog2 included is dumb and only works on the sample input I provided. It's a wee bit hardcoded.
Note 3: everything must be in the same directory.