c++ wasn't working, so I switched to a python script to do it. Correct answer