#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
bool check(int a[],int n) {//判断是否为回文数
bool flag = true;
if (n == 1 && a[0] == 0) {
return true;
}
if (a[0] <= 0) {
flag = false;
}
for (int i = 0;i <= n / 2;i++) {
if (a[i] != a[n - i-1]) {
flag = false;
}
}
return flag;
}
int main()
{
string str;
int count = 0;
bool flag = true;
cin >> str;
int len = str.length();
vector<int> c(len);
for (int i = 0;i < len;i++) {
c[i] = str[i] - '0';
}
if (check(&c[0], c.size())) {
for (int i = 0;i < c.size();i++)
cout << c[i];
cout << " is a palindromic number.";
return 0;
}
while (count < 10) {
int x = 0;
len = c.size();
vector<int> a(len);
vector<int> b(len);
for (int i = 0;i < len;i++) {
a[i] = c[i];
b[len - i - 1] = c[i];
}
for (int i = 0;i < len;i++) {
x = x + a[i] + b[i];
c[i] = x % 10;
x = x / 10;
}
if (x != 0) {
c.push_back(x);
}
reverse(c.begin(), c.end());
if (check(&c[0], c.size())) {
for (int i = 0;i < a.size();i++)
cout << a[i];
cout << " + ";
for (int i = 0;i < b.size();i++)
cout << b[i];
cout << " = ";
for (int i = 0;i < c.size();i++)
cout << c[i];
cout << endl;
for (int i = 0;i < c.size();i++)
cout << c[i];
cout << " is a palindromic number.";
return 0;
}
else {
for (int i = 0;i < a.size();i++)
cout << a[i];
cout << " + ";
for (int i = 0;i < b.size();i++)
cout << b[i];
cout << " = ";
for (int i = 0;i < c.size();i++)
cout << c[i];
cout << endl;
}
count++;
}
if (count >= 10) {
cout << "Not found in 10 iterations.";
}
return 0;
}