#K65832. Submersion Levels of Islands

    ID: 32285 Type: Default 1000ms 256MiB

Submersion Levels of Islands

Submersion Levels of Islands

You are given n islands along with their respective elevations. Additionally, a parameter l is provided which represents the maximum potential water rise, though it does not affect the submersion level.

The task is to determine the minimum water level at which each island becomes submerged. An island with elevation \(h_i\) will be submerged when the water level reaches \(h_i\), i.e., \[ s_i = h_i \] for \(1 \leq i \leq n\>.

Simply put, output the list of island elevations as the required water levels.

inputFormat

The input is read from standard input with the following format:

  • The first line contains two integers: n (the number of islands) and l (the maximum water level rise, which is not used in the calculation).
  • The second line contains n space-separated integers, representing the elevations of the islands.

outputFormat

Output a single line to the standard output. The line should contain n space-separated integers representing the minimum water level at which each island becomes submerged.

Each island is submerged when the water level equals its elevation.

## sample
5 10
2 8 5 1 7
2 8 5 1 7