---
# System prepended metadata

title: Untitled

---

Athletes are standing in a line one behind another with their skill points (non-negative numbers). Each athlete challenges another athlete in the line who is standing in front of him.

Every athlete chooses the immediate second athlete having more skill points than himself standing in front of him. If an athlete does not find any other athlete to challenge, consider the skill points of the athlete challenged as **-1**.

For example, if the athletes standing with their skill points are `1 3 7 5`.

- The athlete with skill point **1** has the athletes with skill points `3 7 5` in front of him. He challenges the athlete with skill points **7**.
- Similarly, the athlete with skill point **3** has the athletes with skill points `7 5` in front of him and challenges the athlete with skill points **5**.
- The athletes with skill points **7** and **5** did not find any athlete to challenge. So, consider the skill points of the athlete challenged as **-1**.

Write a program that reads the skill points of athletes **S** and prints the skill points of the athlete challenged by each athlete.

---

#### Input

The input will be a single line containing space-separated integers representing the skill points `S`.

---

#### Output

The output should be a single line containing a list indicating the skill points of the athlete challenged by each athlete.

---

#### Explanation

For example, if the given skill points are `S = 1 3 2 10 5`,

  <div style="display: table-row;vertical-align: inherit; border-color: inherit;">
     <div style="display: table-cell; vertical-align: inherit;font-weight: bold; text-align: center; border-right: 1px solid #dcdcdc;padding: 8px 12px;">Skill points</div>
     <div style="display: table-cell;vertical-align: inherit; font-weight: bold;text-align: center; border-right: 1px solid #dcdcdc;padding: 8px 12px;">1</div>
     <div style="display: table-cell;vertical-align: inherit; font-weight: bold;text-align: center;border-right: 1px solid #dcdcdc;padding: 8px 12px;">3</div>
     <div style="display: table-cell;vertical-align: inherit; font-weight: bold;text-align: center;border-right: 1px solid #dcdcdc;padding: 8px 12px;">2</div>
     <div style="display: table-cell;vertical-align: inherit; font-weight: bold;text-align: center;border-right: 1px solid #dcdcdc;padding: 8px 12px;">10</div>
     <div style="display: table-cell;vertical-align: inherit; font-weight: bold;text-align: center;border-right: 0;padding: 8px 12px;">5</div>
  </div>
  <div style="display: table-row;vertical-align: inherit; border-color: inherit;">
     <div style="display: table-cell; vertical-align: inherit;font-weight: bold;border-right: 1px solid #dcdcdc;padding: 8px 12px;border-top: 1px solid #dcdcdc;">Position</div>
     <div style="display: table-cell; vertical-align: inherit;border-right: 1px solid #dcdcdc;padding: 8px 12px;border-top: 1px solid #dcdcdc;">0</div>
     <div style="display: table-cell; vertical-align: inherit;border-right: 1px solid #dcdcdc;padding: 8px 12px;border-top: 1px solid #dcdcdc;">1</div>
     <div style="display: table-cell; vertical-align: inherit;border-right: 1px solid #dcdcdc;padding: 8px 12px;border-top: 1px solid #dcdcdc;">2</div>
     <div style="display: table-cell; vertical-align: inherit;border-right: 1px solid #dcdcdc;padding: 8px 12px;border-top: 1px solid #dcdcdc;">3</div>
     <div style="display: table-cell; vertical-align: inherit;border-right: 0;padding: 8px 12px;border-top: 1px solid #dcdcdc;">4</div>
  </div>

- _0th index_: **3** is the first number greater than **1**, and **2** is the second number greater than **1**. So, the first athlete challenges the third athlete with skill points **2**.
- _1st index_: **10** is the first number greater than **3**, and **5** is the second number greater than **3**. So, the second athlete challenges the fifth athlete with skill points **5**.
- _2nd index_: **10** is the first number greater than **2**, and **5** is the second number greater than **2**. So, the third athlete also challenges the fifth athlete with skill points **5**.
- _3rd index_: The fourth athlete does not find any athlete to challenge. (consider as **-1**)
- _4th index_: The fifth athlete does not find any athlete to challenge. (consider as **-1**)

The output should be `[2, 5, 5, -1, -1]`
