#include <iostream>
using namespace std;

class Solution {
   public:
    bool isPalindrome(string& s) {
        string st = "";
        for (auto& c : s) {
            c = tolower(c);
            if (c >= 'a' and c <= 'z' or c >='0' and c<='9') {
                st += c;
            }
        }
        cout <<st<<endl;

        int n = st.size();
        int l = 0, r = n - 1;
	
        while (l <= r) {
            if (st[l] != st[r])
                return false;
            else {
                l++, r--;
            }
        }

        return true;
    }
};


int main() {
	string s = "0P";
	Solution sol;
	bool ans = sol.isPalindrome(s);
	cout << ans;
	return 0;
}