while s=gets.reverse do puts s end