#include <vector>
#include <string>
#include <iostream>
class Variable
{
private:
	std::vector<char> mValue;	// 紀錄，例如 mValue = 1?2??
	int mMaxN;					// 有多少種變化型
public:
	void Set(std::string v) 
	{
		mMaxN = 1;
		for (unsigned i = 0; i < v.size() ; ++i) 
		{
			if (v[i] >= '0' && v[i] <= '9') 
			{
				mValue.push_back(v[i]);
			}
			else 
			{
				mValue.push_back('?');
				mMaxN *= 10;
			}
		}
	}
	unsigned GetMaxN()const		// 有多少種變化型[0 ~ N-1]
	{
		return mMaxN;
	}
	unsigned GetValue(unsigned Nth)const //獲得第 N 大的資料
	{
		unsigned res = 0;
		unsigned pow = 1;
		for (int i = mValue.size() - 1; i >= 0; --i)
		{
			if (mValue[i] == '?')
			{
				res += (Nth % 10) * pow;
				Nth /= 10;
			}
			else
			{
				res += (mValue[i] - '0') * pow;
			}
			pow *= 10;
		}
		return res;
	}
};

int main()
{
	Variable vX, vY, vZ;
	std::string strX, strY, strZ;
	std::cin >> strX >> strY >> strZ;
	vX.Set(strX);
	vY.Set(strY);
	vZ.Set(strZ);
	for (unsigned xx = 0; xx < vX.GetMaxN(); ++xx) 
	{
		for (unsigned yy = 0; yy < vY.GetMaxN(); ++yy) 
		{
			for (unsigned zz = 0; zz < vZ.GetMaxN(); ++zz) 
			{
				if (vX.GetValue(xx)*vY.GetValue(yy) == vZ.GetValue(zz)) 
				{
					std::cout << vX.GetValue(xx) << "x" << vY.GetValue(yy) << "=" << vZ.GetValue(zz) << std::endl;
				}
			}
		}
	}
	system("Pause");
	return 0;
}