You are given an array consisting of integers. Your task is to find the longest subsequence S, such that XOR of any two elements in is non-zero.
You are required to print the size of and the array of indices that are chosen for . In case of multiple such arrays, choose the lexicographically smallest array.
Example: Let array A be [7, 9, 7], the maximum length of subsequence can be 2. There are two ways to choose a subsequence, [7, 9] and [9, 7]. The indices selected in the first case are [1, 2] while in the second they are [2, 3] so we need to choose [1, 2] as it is minimal.
Input format
Output format
For each test case:
Constraints
Some ways of choosing with length 3:
[1,2,4], [1,4,5] [2,3,5] and [3,4,5]. Choose the minimal out of them.