P12649 [AOJ] Anagram
普及
题目描述

problem

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

Condition: Well sorted $a_1, \ cdots, a_K$ matches $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