Palindrome Ambigrammer

   Input:
Output:

A palindrome is a an alphanumeric sequence (words, numbers, phrases) that can be read the same way in either direction. An ambigram is an alphanumeric sequence that is designed to be read in another direction or orientation.

This script could be very useful for palindrome composition. N.B. For an odd lengthed sequence manually delete the extra character from the "Output".
I got the character flipping code from here.