#include<stdio.h>
#include<string.h>
int stack[10000];
int sum[10000];
int main()
{
//
freopen("input.txt","r",stdin);
int top = 0; //count from 1
while(true)
{
top = 0;
memset(sum, 0, sizeof(sum) );
if(scanf("%d", &stack[++top]) != 1) break;
bool ok = true;
while(getchar() != '\n')
{
int temp;
scanf("%d", &temp);
if(ok == false) continue;
if(temp <0)
{
stack[++top] = temp;
sum[top-1] += -(temp);
}
else if(temp > 0)
{
if(-temp != stack[top] )
{
ok = false;
}
else
{
if(sum[top] >= - stack[top])
{
ok = false;
}
else
{
sum[top] =0;
top--;
}
}
}
}
if(top == 0 && ok)
printf(":-) Matrioshka!\n");
else
printf(":-( Try again.\n");
}
}