class Deque:
    
    def __init__(self):
        self.items = []
    
    def addFront(self,item):
        self.items.append(item)
        
    def addRear(self,item):
        self.items.insert(0,item)
        
    def removeFront(self):
        return self.items.pop()
        
    def removeRear(self):
        return self.items.pop(0)
        
    def isEmpty(self):
        return self.items == []
    
    def size(self):
        return len(self.items)
        
    def view(self):
        return self.items
        
def palchecker(text):
    
    q = Deque()
    
    for let in text:
        q.addRear(let)
        
    ans = True
  
    while q.size()>1 and ans:
        last = q.removeRear()
        first = q.removeFront()
        if last != first:
            ans = False
    
    return ans
    
print(palchecker("lsdkjfskf"))
print(palchecker("radar"))