Printing the first lines use sed

It displays the first 10 lines of input; the
number of displayed lines is right before the ‘q’
command.

#!/usr/bin/sed -f
10q