output_description: Print the lexicographically smallest string of length K that Iroha can
  produce.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N K
      s_1
      s_2
      :
      s_N
attempt: N, K = [int(x) for x in input().split()]
  Kp1 = K + 1
  ss = [input() for _ in range(N)]
  ds = ["~" * n for n in range(Kp1)]
  for s in ss:
      len_s = len(s)
      for i in range(Kp1 - len_s):
          t = ds[i] + s
          if t < ds[i + len_s]:
              ds[i + len_s] = t
  print(ds[K])
  
problem_description: Statement
  
  Iroha has a sequence of N strings s_1, s_2, ..., s_N.
  
  She will choose some (possibly all) strings from the sequence, then
  concatenate those strings retaining the relative order, to produce a long
  string.
  
  Among all strings of length K that she can produce in this way, find the
  lexicographically smallest one.
samples: [{"input": "3 7\n    at\n    coder\n    codar", "output": "atcodar\n    \n\n`at` and `codar` should be chosen.\n\n* * *"}, {"input": "3 7\n    coder\n    codar\n    at", "output": "codarat\n    \n\n`codar` and `at` should be chosen.\n\n* * *"}, {"input": "4 13\n    kyuri\n    namida\n    zzzzzzz\n    aaaaaa", "output": "namidazzzzzzz\n    \n\n`namida` and `zzzzzzz` should be chosen."}]