#abc283g. [abc283_g]Partial Xor Enumeration

[abc283_g]Partial Xor Enumeration

Problem Statement

For a sequence of non-negative integers (a1,a2,ldots,an)(a _ 1,a _ 2,\\ldots,a _ n), let us define its operatornamexor\\operatorname{xor} as the integer XX such that, for all non-negative integer jj:

  • the 2j2^js place of XX is 11 if and only if there is an odd number of elements among a1,ldots,ana _ 1,\\ldots,a _ n whose 2j2^js place is 11.

You are given a sequence of non-negative integers A=(A1,A2,ldots,AN)A=(A _ 1,A _ 2,\\ldots,A _ N) of length NN.

Let $\\lbrace s _ 1,s _ 2,\\ldots,s _ k\\rbrace\\ (s _ 1\\lt s _ 2\\lt\\cdots\\lt s _ k)$ be the set of all non-negative integers that can be the operatornamexor\\operatorname{xor} of a not-necessarily-contiguous (possibly empty) subsequence of AA.

Given integers LL and RR, print sL,sL+1,ldots,sRs _ L,s _ {L+1},\\ldots,s _ R in this order.

Constraints

  • 1leqNleq2times1051\\leq N\\leq2\\times10^5
  • 0leqAilt260(1leqileqN)0\\leq A _ i\\lt2^{60}\\ (1\\leq i\\leq N)
  • 1leqLleqRleqk1\\leq L\\leq R\\leq k
  • RLleq2times105R-L\\leq2\\times10^5
  • All values in the input are integers.

Input

The input is given from Standard Input in the following format:

NN LL RR A1A _ 1 A2A _ 2 ldots\\ldots ANA _ N

Output

Print si(LleqileqR)s _ i\\ (L\\leq i\\leq R) in ascending order of ii, separated by spaces.


Sample Input 1

4 1 8
2 21 17 21

Sample Output 1

0 2 4 6 17 19 21 23

There are 1414 not-necessarily-contiguous subsequences of AA: $(),(2),(17),(21),(2,17),(2,21),(17,21),(21,17),(21,21),(2,17,21),(2,21,17),(2,21,21),(21,17,21)$, and (2,21,17,21)(2,21,17,21), whose operatornamexor\\operatorname{xor}s are as follows.

  • The operatornamexor\\operatorname{xor} of ()() is 00.
  • The operatornamexor\\operatorname{xor} of (2)(2) is 22.
  • The operatornamexor\\operatorname{xor} of (17)(17) is 1717.
  • The operatornamexor\\operatorname{xor} of (21)(21) is 2121.
  • The operatornamexor\\operatorname{xor} of (2,17)(2,17) is 1919.
  • The operatornamexor\\operatorname{xor} of (2,21)(2,21) is 2323.
  • The operatornamexor\\operatorname{xor} of (17,21)(17,21) is 44.
  • The operatornamexor\\operatorname{xor} of (21,17)(21,17) is 44.
  • The operatornamexor\\operatorname{xor} of (21,21)(21,21) is 00.
  • The operatornamexor\\operatorname{xor} of (2,17,21)(2,17,21) is 66.
  • The operatornamexor\\operatorname{xor} of (2,21,17)(2,21,17) is 66.
  • The operatornamexor\\operatorname{xor} of (2,21,21)(2,21,21) is 22.
  • The operatornamexor\\operatorname{xor} of (21,17,21)(21,17,21) is 1717.
  • The operatornamexor\\operatorname{xor} of (2,21,17,21)(2,21,17,21) is 1919.

Therefore, the set of all non-negative integers that can be the operatornamexor\\operatorname{xor} of a subsequence of AA is lbrace0,2,4,6,17,19,21,23rbrace\\lbrace0,2,4,6,17,19,21,23\\rbrace.


Sample Input 2

4 3 7
2 21 17 21

Sample Output 2

4 6 17 19 21

Sample Input 3

5 1 1
0 0 0 0 0

Sample Output 3

0

AA may contain the same value.


Sample Input 4

6 21 21
88 44 82 110 121 80

Sample Output 4

41

Sample Input 5

12 26 48
19629557415 14220078328 11340722069 30701452525 22333517481 720413777 11883028647 20926361028 24376768297 720413777 27999065315 13558621130

Sample Output 5

13558621130 14220078328 14586054825 15518998043 15970974282 16379590008 17091531049 17412316967 17836964726 18263536708 18965057557 19629557415 20282860278 20926361028 21302757781 21908867832 22333517481 22893781403 23595304394 23723463544 24376768297 24885524507 25261923402

Note that the input and output may not fit into a 3232-operatornamebit\\operatorname{bit} integer type.