Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
A. Mountain Scenery

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputLittle Bolek has found a picture with *n* mountain peaks painted on it. The *n* painted peaks are represented by a non-closed polyline, consisting of 2*n* segments. The segments go through 2*n* + 1 points with coordinates (1, *y*_{1}), (2, *y*_{2}), ..., (2*n* + 1, *y*_{2n + 1}), with the *i*-th segment connecting the point (*i*, *y*_{i}) and the point (*i* + 1, *y*_{i + 1}). For any even *i* (2 ≤ *i* ≤ 2*n*) the following condition holds: *y*_{i - 1} < *y*_{i} and *y*_{i} > *y*_{i + 1}.

We shall call a vertex of a polyline with an even *x* coordinate a mountain peak.

Bolek fancied a little mischief. He chose exactly *k* mountain peaks, rubbed out the segments that went through those peaks and increased each peak's height by one (that is, he increased the *y* coordinate of the corresponding points). Then he painted the missing segments to get a new picture of mountain peaks. Let us denote the points through which the new polyline passes on Bolek's new picture as (1, *r*_{1}), (2, *r*_{2}), ..., (2*n* + 1, *r*_{2n + 1}).

Given Bolek's final picture, restore the initial one.

Input

The first line contains two space-separated integers *n* and *k* (1 ≤ *k* ≤ *n* ≤ 100). The next line contains 2*n* + 1 space-separated integers *r*_{1}, *r*_{2}, ..., *r*_{2n + 1} (0 ≤ *r*_{i} ≤ 100) — the *y* coordinates of the polyline vertices on Bolek's picture.

It is guaranteed that we can obtain the given picture after performing the described actions on some picture of mountain peaks.

Output

Print 2*n* + 1 integers *y*_{1}, *y*_{2}, ..., *y*_{2n + 1} — the *y* coordinates of the vertices of the polyline on the initial picture. If there are multiple answers, output any one of them.

Examples

Input

3 2

0 5 3 5 1 5 2

Output

0 5 3 4 1 4 2

Input

1 1

0 2 0

Output

0 1 0

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/22/2021 06:11:26 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|