Knitting

You are knitting a scarf in a striped pattern, having made strong progress
on the first few stripes. You have multiple colours available to continue creating the
pattern and would very much like that no colour appears too often - more specifically,
that the colour appearing most often still appears as few times as possible.

figure[!h]
sample1.pdf
A knitted solution to sample input 1. No colour is used more than
twice, nor is any colour repeated within 3 consecutive stripes.
figure

Please extend the given design to fashion a nice scarf.

Input
	itemize
    One line containing the number of stripes to create, ,
          the number of colours available, , and the minimum
          spacing between stripes of the same colour,  ().
    One line containing the number of stripes already knitted,  ().
    One line containing  integers, the colours of the stripes 
         ().
	itemize

  The colours of the stripes are represented as integers in .

Output
  Output any stripe pattern starting with  that does not repeat any of
  the colours too soon and uses the most-frequent colour as few times as possible.

  If it is not possible to create a scarf from the parameters, output impossible
  instead.
