Don't mix two problems and think they are one

Always remember it's the simple Input => Process => Output model.

Read stuff in, ponder, output other stuff.