시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 318 285 267 90.816%

문제

JOI는 친구 1부터 친구 N까지 총 N 명의 친구와 함께, 크리스마스 파티에 갔습니다. 크리스마스 파티 분위기도 달아오르니, JOI는 친구들과 함께 다음과 같은 게임을 하기로 했습니다.

  1. 가장 먼저, JOI는 N명의 친구 중 한 명을 선택합니다. 이제 그 친구를 '타겟'이라고 부릅시다.
  2. JOI는 타겟으로 고른 친구에게, 타겟이 되었다는 것을 몰래 알려줍니다. 타겟이 아닌 친구들은 누가 타겟인지 알 수 없습니다.
  3. 타겟이 아닌 친구들은 각자 타겟이 누구일까 생각해서, 그 사람의 이름을 종이에 씁니다. 타겟은 자기자신의 이름을 종이에 씁니다.
  4. 모든 사람이 종이에 이름을 썼다면, JOI는 타겟의 이름을 발표합니다.
  5. 예상이 맞은 사람은 1점을 얻습니다. 당연히, 타겟은 자신의 이름을 적었으므로, 반드시 1점을 얻습니다. 예상이 빗나간 사람은 점수를 주지 않습니다.
  6. 추가로, 예상이 빗나간 사람의 수가 X명일 경우, 타겟은 추가로 X점을 얻습니다.
 JOI와 친구들은 이 게임을 M번 했습니다. M번의 게임을 했을 때, 각 친구들의 합계 점수를 구하세요.

입력

입력은 총 3 + M 줄이 주어집니다.

첫 번째 줄에는 친구들의 수 N (3 ≦ N ≦ 100)이 주어집니다.

두 번째 줄에는 JOI와 친구들이 했던 게임의 횟수 M (3 ≦ M ≦ 100)이 주어집니다.

세 번째 줄에는 M개의 정수 A1, A2, ...,  AM 이 공백을 사이에 두고 주어집니다. i번째 (1 ≦ i ≦ M) 게임의 타겟이 친구 Ai (1 ≦ Ai ≦ N) 라는 것을 나타냅니다.

이어지는 M개의 줄 중 i(1 ≦ i ≦ M)번째 줄에는, N개의 정수 Bi,1, Bi,2, ..., Bi,N가 공백을 사이에 두고 주어집니다. 이것은 i번째 게임에서 친구 j(1 ≦ j ≦ N)가 친구 Bi,j (1 ≦ Bi,j ≦ N)의 이름을 종이에 썼다는 것을 의미합니다. 타겟은 자신의 이름을 종이에 쓰도록 되어 있으므로, j = Ai 이면, 반드시 Bi,j = j입니다.

출력

M번의 게임에서, 각각의 친구들이 얻은 합계 점수를 출력하세요.

총 N줄의 출력에서,  j번째 (1 ≦ j ≦ N) 줄에는 친구 j의 합계 점수를 출력하세요.

예제 입력 1

3
4
1 2 3 2
1 1 2
3 2 2
1 1 3
2 2 2

예제 출력 1

3
4
5

예제 입력 2

5
3
3 3 1
2 4 3 3 3
4 3 3 3 1
1 3 4 1 1

예제 출력 2

3
1
6
3
2

힌트

예제 1의 경우, 3명의 친구가 4번의 게임을 합니다.

  • 첫 번째 게임의 타겟은 '친구 1'이므로, 친구 1 은 2점, 친구 2 는 1점, 친구 3 은 0점을 얻습니다.
  • 두 번째 게임의 타겟은 '친구 2'이므로, 친구 1 은 0점, 친구 2 는 2점, 친구 3 은 1점을 얻습니다.
  • 세 번째 게임의 타겟은 '친구 3'이므로, 친구 1 은 0점, 친구 2 는 0점, 친구 3 은 3점을 얻습니다.
  • 네 번째 게임의 타겟은 '친구 2'이므로, 친구 1 은 1점, 친구 2 는 1점, 친구 3 은 1점을 얻습니다.

4번의 게임 종료 후의 합계 점수는, 친구 1 은 3점, 친구 2 는 4점, 친구 3은 5점이 됩니다.

W3sicHJvYmxlbV9pZCI6IjEwNzA4IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVkMDZjXHViOWFjXHVjMmE0XHViOWM4XHVjMmE0IFx1ZDMwY1x1ZDJmMCIsImRlc2NyaXB0aW9uIjoiPHA+Sk9JXHViMjk0IFx1Y2U1Y1x1YWQ2YyAxXHViZDgwXHVkMTMwIFx1Y2U1Y1x1YWQ2YyBOXHVhZTRjXHVjOWMwIFx1Y2QxZCBOIFx1YmE4NVx1Yzc1OCBcdWNlNWNcdWFkNmNcdWM2NDAgXHVkNTY4XHVhZWQ4LCBcdWQwNmNcdWI5YWNcdWMyYTRcdWI5YzhcdWMyYTQgXHVkMz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