PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GD0000034. Quái vật (Monsters)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Quái vật (Monsters)

Monsters

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

There are nn monsters with health aia_i. Repeated attacks deal kk damage according to the original process. Determine the order in which monsters die.

Input

The first line contains n,kn,k. The second line contains a1,…,ana_1,\ldots,a_n.

Output

Print the monster indices in death order.

Constraints

  • 1≤n≤3⋅1051\le n\le 3\cdot10^5.
  • 1≤k≤1091\le k\le 10^9.
  • 1≤ai≤1091\le a_i\le 10^9 for 1≤i≤n1\le i\le n.

Subtasks

  • Subtask 1 (20 points): n≤8n\le 8.
  • Subtask 2 (30 points): n≤30n\le 30.
  • Subtask 3 (50 points): Full constraints.

Examples

Input

3 3
1 2 3

Output

3 2 1

Explanation

The sample follows the ordering rule described in the Vietnamese explanation and produces the shown optimum.