loop{a,_,b=gets.partition(' ') a.split(/,/).reverse.map{|v|b[v.to_i,0]=' '} puts b}