for line in io.lines"input.txt" do print( line:reverse():gsub("%S+", string.reverse) ) end