for(i=-1;i++<99;print(s))for(x=i,s="";s=[w="world","hello",w+"!"][x%3]+s,x=x/3|0;)s=" "+s