#include <stdio.h> #include <math.h> int main() { int n; while (scanf("%d", &n) != EOF) { int a[n]; for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } int m; scanf("%d", &m); int low = pow(2, m - 1) - 1; int high = pow(2, m) - 2; if (low > n - 1) { printf("EMPTY\n"); } else{ for (int i = low; (i < high) && (i < n); i++) { printf("%d ", a[i]); } printf("%d\n", a[high]); } } return 0; }