def ReverseChar (str)
	str_arr = []
	rev_str_arr = []
	str.each_char {|char|
		str_arr << char
	}
	rev_str_arr = str_arr.reverse
	return rev_str_arr.join()
end

while str = gets.chomp
	p ReverseChar(str)
end