
5597

public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
boolean[] submitted = new boolean[31];
for (int i = 0; i < 28; i++) {
int number = sc.nextInt();
submitted[number] = true;
}
for (int i = 1; i < submitted.length; i++) {
if (!submitted[i]) {
System.out.println(i);
}
}
}
}
3052

public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
HashSet<Integer> remainders = new HashSet<>();
for (int i = 0; i < 10; i++) {
int n = sc.nextInt();
remainders.add(n % 42);
}
System.out.println(remainders.size());
}
}
10811

public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
int[] baskets = new int[N];
for (int i = 0; i < N; i++) {
baskets[i] = i + 1;
}
for (int m = 0; m < M; m++) {
int k = sc.nextInt() -1;
int j = sc.nextInt() -1;
while (k < j) {
int temp = baskets[k];
baskets[k] = baskets[j];
baskets[j] = temp;
k++;
j--;
}
}
for (int basket : baskets) {
System.out.print(basket + " ");
}
}
}