N['HxH'];main(i){for(;~scanf("%d",N)&i?N[*N]=1:!N[++i]||printf("%d ",i)-8;);}