class Palindrome {

    public boolean isPalindrome(String word) {
        Deque<Character> deque = wordToDeque(word);
        while(deque.size() > 1) {
            if(deque.removeFirst() != deque.removeLast()) {
                return false;
            }
        }
        return true;
    }

}