import java.util.Scanner


	fun main(args: Array<String>) {
		val scanner = Scanner(System.`in`)
		val string = scanner.next()
		println(
				if (string.length == 3) StringBuffer(string).reverse() else string
		)
		scanner.close()
	}