Automate response to prompt

I'm running a program in the terminal on a computer running ubuntu. After inputing a file containing 900 data sets, I have to enter the line number a particular data set I want to analyze begins on, followed by the number that corresponds to the type of analysis I want. I have to do this for every single set of data, which I don't so much mind when the sets are fairly small. However, my most recent file has 900 sets of data, and I'd love to automate the process. Basically, I'd like to create a program that, when prompted with a request for the line number, automatically enters 1+n*44, return, 3, return. And I'd like it to run from n=0 all the way to n=899, preferably in sequential order.
Any idea how to do this? Can one even set up a program that responds to the prompts of another program? Is this even the right forum for a question like mine? Or do I need to start learning my 44 times tables and clearing out my social schedule? Thanks!