a=gets.split(' ');99.times{|i|a.size.times{|j|a[j].gsub!(/./,' ') if a[j].size==i};break if (b=a.join(' ').rstrip).match(/^ *$/);puts b}