output_description: Print the smallest possible sum of the digits in the decimal notation of a
  positive multiple of K.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K
attempt: k = int(input())
  from collections import deque
  d = deque([1])
  discovered = {1:1}
  while true:
    q = d.popleft()
    if q == 0: 
    	print(discovered[q])
    	quit()
    if (q*10)%k not in discovered:
      if (q*10)%k == 0:
        
      d.appendleft((q*10)%k)
      discovered[(q*10)%k] = discovered[q]
    if q+1 not in discoverd:
      d.append(q+1)
      discovered[q+1] = discovered[q]+1
      
      
problem_description: Statement
  
  Find the smallest possible sum of the digits in the decimal notation of a
  positive multiple of K.
samples: [{"input": "6", "output": "3\n    \n\n12=6\u00d72 yields the smallest sum.\n\n* * *"}, {"input": "41", "output": "5\n    \n\n11111=41\u00d7271 yields the smallest sum.\n\n* * *"}, {"input": "79992", "output": "36"}]