시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 286 256 241 90.943%

문제

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+Sk9JXHViMjk0IFx1Y2U1Y1x1YWQ2YyAxXHViZDgwXHVkMTMwIFx1Y2U1Y1x1YWQ2YyBOXHVhZTRjXHVjOWMwIFx1Y2QxZCBOIFx1YmE4NVx1Yzc1OCBcdWNlNWNcdWFkNmNcdWM2NDAgXHVkNTY4XHVhZWQ4LCBcdWQwNmNcdWI5YWNcdWMyYTRcdWI5YzhcdWMyYTQgXHVkMzB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