Well even if u have to use stacks i dont think u need three stacks .
Well u can do something like this .
just create one stack where the elements of the string is pushed.
then pop the elements of the stack and check with the elements of the string itself . if there s any kind of mismatch print not palindrome and break of .
Well the code which i have mentioned earlier works perfectly fine .
i can still write the stack version of it , the only problem is that my code is very traditional and kinda outdated (but still will work ) compared to this new style of programming.