#include void run(void){ int n,k,x; scanf("%d%d%d",&n,&k,&x); int A[100001]; int B[100001]; int D[100001]; int i; for(i=1;i<=n;i++){ D[i]=i; } for(i=1;ix;i--){ int t=C[A[i]]; C[A[i]]=C[B[i]]; C[B[i]]=t; } i=1; while(C[i]==D[i]){ i++; } printf("%d",i); i++; while(C[i]==D[i]){ i++; } printf(" %d\n",i); return; } int main(void){ run(); return 0; }