Create a function that takes a string and returns a new string with its first and last characters swapped, except under three conditions:
"Incompatible."."Incompatible."."Two's a pair.".FlipEndChars("Cat, dog, and mouse.") ➞ ".at, dog, and mouseC"
FlipEndChars("ada") ➞ "Two's a pair."
FlipEndChars("Ada") ➞ "adA"
FlipEndChars("z") ➞ "Incompatible."
FlipEndChars([1, 2, 3]) ➞ "Incompatible."Tests are case sensitive (e.g. "A" and "a" are not the same character).