I am generating a string in this code and then applying a substring to it.
for(int i = 0; i < input.length(); i++) //i tracks which line we are on when pri