#include<iostream>
#include<string>
using namespace std;

int main()
{
	string in;
	cin >> in; //Take input
	
	string variable, coefficientString; //Variable declerations
	
	for(unsigned int i = 0; i < in.length(); ++i)
	{
		unsigned int currentVal = (int)in.c_str()[i]; //Get the integer value of the current character
		if(currentVal > 47 && currentVal < 58) //On an ASCII table all integers are between 47 and 57, in this case a number has been entered
		{
			coefficientString += in.c_str()[i]; //All numbers are added to a string for the coefficient
		}
		else
		{
			variable += in.c_str()[i]; //All non-numerical values are being considered variables, you may want to limit this to alphabetical only
		}
	}
	
	int coefficient = atoi(coefficientString.c_str()); //The string is then converted to an integer
	coefficient *= coefficient; //As an example to show this works, coefficient is squared
	variable += variable; //Variable is also squared, in this case it is represented by repeating the variables
	
	cout << coefficient << variable;
	return 0;
}