Swift version of Palidrome