#D7913. Anagram

    ID: 6579 Type: Default 1000ms 268MiB

Anagram

Anagram

problem

Given a sequence ai a_i of length N N . Output all integers K(1 leK leN) K (1 \ le K \ le N) that satisfy the following conditions.

Condition: Well sorted a1, cdots,aK a_1, \ cdots, a_K matches aNK+1, cdots,aN a_ {N-K + 1}, \ cdots, a_N .

Example

Input

8 5 2 4 9 4 9 2 5

Output

1 2 4 6 7 8

inputFormat

outputFormat

Output all integers K(1 leK leN) K (1 \ le K \ le N) that satisfy the following conditions.

Condition: Well sorted a1, cdots,aK a_1, \ cdots, a_K matches aNK+1, cdots,aN a_ {N-K + 1}, \ cdots, a_N .

Example

Input

8 5 2 4 9 4 9 2 5

Output

1 2 4 6 7 8

样例

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