a ="Win today's preliminary contest and be qualified to visit University of Aizu."
a.gsub!(","," ")
a.gsub!("."," ")
a = a.split(" ")
r = a.map do |el|
  if el.length >= 3 && el.length <= 6
   el 
  end
end
r.compact!