#include #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) (v).begin(),(v).end() #define int long long using namespace std; //----------------------------------------------------------------------- signed main() { int N,M; cin>>N>>M; vector a(N); REP(i,N){ cin>>a[i]; } sort(ALL(a)); int sum=0; REP(i,M) sum^=a[i]; int ans=sum,idx_start=0; for(int i=1;ians){ ans=sum; idx_start=i; } } REP(i,M){ if(i) cout<<' '; cout<