#include <iostream>#include <fstream>using namespace std;int main (){ ifstream fin ("palindromsd.in"); ofstream fout ("palindromsd.out"); int n,pal,x,uc; while(fin>>n) { pal=0; x=n; while(x!=0) { uc=x%10; pal=pal*10+uc; x=x/10; } if(n==pal) fout<<n<<' '; } return 0;}