import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int [] Cupf = new int [N]; for(int i=0; iX-1; i--){ int t = Cupt[ A[i]-1 ]; Cupt[ A[i]-1 ] = Cupt[ B[i]-1 ]; Cupt[ B[i]-1 ] = t; } int [] r = new int [2]; int z =0; for(int i=0; i