시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 209 194 181 93.299%

문제

교실에는 N명의 학생들이 한 줄로 서 있다. 각 학생들은 번호표를 하나씩 가지고 있다. i번째 학생의 번호표에 적힌 수는 Ai이다.

그리고 M개의 카드가 있다. 이 카드는 1부터 M까지의 값을 가진다. 각 카드는 반드시 1부터 사용하며, k (2 ≤ k ≤ M) 번 카드는 k-1번 카드를 쓴 다음에 쓴다.

게임의 규칙은 다음과 같다.

  • 선생님이 1번 학생에게 i번 카드를 준다. (1 ≤ i ≤ M)
  • 카드를 받은 j번 학생은 j+1번 학생에게 카드를 넘긴다.
  • Aj % i의 값이 Aj+1%i 의 값보다 크면 두 학생의 번호표를 서로 교환한다.
  • 마지막 학생이 카드를 받으면 그 카드는 버린다.

이 과정은 마지막 M번 카드까지 버리면 끝난다.

이 과정을 모두 마친 후의 각 학생들이 가진 번호표를 순서대로 출력하는 프로그램을 작성하시오.

입력

첫 번째 줄에 학생의 수와 카드의 수를 나타내는 정수 N, M (1 ≤ N ≤ 100, 1 ≤ M ≤ 100) 이 공백으로 구분되어 입력된다.

두 번째 줄부터 N줄에 걸쳐서 각 학생이 가지는 번호표의 값 Ai (1 ≤ Ai ≤ 1000) 가 주어진다.

출력

게임이 종료된 후에 각 학생이 가지는 번호표의 값을 공백으로 구분하여 출력한다.

예제 입력 1

6 4
3
2
8
3
1
5

예제 출력 1

2
3
1
8
5
3

예제 입력 2

10 6
1
2
3
4
5
6
7
8
9
10

예제 출력 2

6
1
2
3
10
4
8
7
9
5

힌트

1번 예제에서

  • 1번 카드를 사용한 후의 학생들의 번호표 : 3 2 8 3 1 5
  • 2번 카드를 사용한 후의 학생들의 번호표 : 2 8 3 3 1 5
  • 3번 카드를 사용한 후의 학생들의 번호표 : 2 3 3 1 8 5
  • 4번 카드를 사용한 후의 학생들의 번호표 : 2 3 1 8 5 3

따라서 2 3 1 8 5 3 이 된다.

W3sicHJvYmxlbV9pZCI6IjExOTQ5Iiwic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