Checks to see if each user-inputted line is a palindrome using a stack and a queue