Fixed input generation bug(forgot to write a newline for each record)