#!/usr/bin/env python3

import sys

if len(sys.argv)<3:
	sys.exit("You have to provide EXACTLY TWO argument")

filename = sys.argv[1]
n = int(sys.argv[2])
cnt=0
with open(filename,"r") as f:
	for line in f:
		if line.startswith("#"):
			cnt += 1
			if cnt > n:
				break
		print(line.rstrip())
