text: #Ngyou.py
  N = input()
  #コマンドラインで受け取り
  with open('popularname.txt') as f:
  #with open(gyou_file) as f:
      gyou = f.readlines()#1行ずつ読み込み
      for i in range(int(N)):#範囲決め
          print(gyou[i].replace('\n', ''))#改行
  #unixコマンド
  #head -n 5 popularname.txt