output_description: Print the (X/2)-th (rounded up to the nearest integer) lexicographically
  smallest sequence listed in FEIS, with spaces in between, where X is the total
  number of sequences listed in FEIS.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K N
attempt: import sys
  sys.setrecursionlimit(100500)
  
  def F(n):
  	return (k**n - 1) // (k - 1)
  
  l = 0
  def go(x, n):
  	global l
  	if (x == 1): return
  	x -= 1
  	t = F(n)
  	c = ((x - 1) // t)
  	print(c + 1, end = ' ')
  	go(x - c * t, n - 1)
  
  
  k, n = [int(i) for i in input().split()]
  
  if k % 2 == 0:
  	print(k // 2. end = ' ')
  	for i in range(n - 1):
  		print(k, end = ' ')
  	exit()
  
  res = F(n) * k
  go((res + 1) // 2 + 1, n)
  	
problem_description: Statement
  
  In Finite Encyclopedia of Integer Sequences (FEIS), all integer sequences of
  lengths between 1 and N (inclusive) consisting of integers between 1 and K
  (inclusive) are listed.
  
  Let the total number of sequences listed in FEIS be X. Among those sequences,
  find the (X/2)-th (rounded up to the nearest integer) lexicographically
  smallest one.
samples: [{"input": "3 2", "output": "2 1 \n    \n\nThere are 12 sequences listed in FEIS:\n(1),(1,1),(1,2),(1,3),(2),(2,1),(2,2),(2,3),(3),(3,1),(3,2),(3,3). The (12/2 =\n6)-th lexicographically smallest one among them is (2,1).\n\n* * *"}, {"input": "2 4", "output": "1 2 2 2\n    \n\n* * *"}, {"input": "5 14", "output": "3 3 3 3 3 3 3 3 3 3 3 3 2 2"}]