This question already has an answer here:
Just out of curiosity: Is there a way to compile latex document with two document classes at once?
Suppose that I have a paper which start with line:
But finally I would like to compile it with such line:
Obviously I can replace these lines and compile file twice, but I wonder if there is any trick to avoid double compilation?