Read the manual, commands are OPEN, READLINE, CLOSE. They come with an example of how to read the lines of a file. You then count the number of lines you're reading in and abort after line 3.
_________________________
There are two types of vessels, submarines and targets.