int main()
{
char n[20] = {0};
int p = 0, i = 0, j = 0;
scanf("%s",n);
i = strlen(n)-1;
while (i >= 0)
{
if (n[i] <= '9' && n[i] >= '0') printf("%d",n[i]-'0');
else if (n[i] <= 'f' && n[i] >= 'a') printf("%d",n[i]-'a'+10);
else if (n[i] <= 'F' && n[i] >= 'A') printf("%d",n[i]-'A'+10);
if (p == 0) printf("*1");
else
for (j = 0; j < p; j++) printf("*16");
if (i != 0) printf(" + ");
else printf("\n");
i--; p++;
}
return 0;
}