Mutation#7383

Mutation

1 δευτερόλεπτο
128 megabyte
Εύκολο

Scientists on planet Olympia investigate various mutations in the genomes of primitive organisms every year. The genome of such an organism can be represented as a sequence of integers, each in the range from to , inclusive. Genomes are subject to constant mutations. At each stage of mutation, the genome changes as follows:

For example, the genome [1, 2, 3], consisting of three numbers, after one mutation becomes [1, 1, 1] — one , one , and one . Other examples:

The genome continues to change according to the same rule in each subsequent mutation.

Write a program that, given the initial genome, determines its state after mutations.

\InputFileThe first line contains two integers and (1 \leq n \leq 10^5, 1 \leq k \leq 10^9) — the initial genome length and the number of mutations. The second line contains integers, each between and , representing the initial genome sequence.

\OutputFilePrint the genome after mutations as a sequence of space-separated integers.

Παραδείγματα

Παράδειγμα 1

Loading
Loading