n,a[99],b[99];main(x){for(;gets(a," ");*b&&printf("%s ",b[n++%x]))for(x=0;b[x]=strtok(x?0:a);)++x;}