#include <stdio.h> int main(){ int arr[6]; int a,n,count; // 获取第一行数据 for (int i=0;i<6;i++){ if (scanf("%d",&a)!=EOF){ arr[i] = a; } } // 获取次数 if (scanf("%d",&n)!=EOF){ for (int j=0;j<6;j++){ count = 0; for (int i=6;i>=1;i--){ // printf("%d %d %d\n",i,j,arr[j]); if (i!=arr[j]){count++;} if (count==n){printf("%d",i);if (j!=5){printf(" ");break;}} } } } return 0; }