Reading nput file into queue