#include <stdio.h> int main() { int arr1[100] = { 0 }; int arr2[100] = { 0 }; int temp = 0; int p = 0; int n = 0, i = 0, j = 0, m = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d ", &arr1[i]); } scanf("%d", &m); for (j = 0; j < n; j++) { if (arr1[j] != m) { arr2[temp++] = arr1[j]; } } for (p = 0; p < temp; p++) { printf("%d ", arr2[p]); } return 0; }