/*
#include <stdio.h>
char stack[50001];
int top=-1;
void push(char data)
{
stack[++top]=data;
}
char pop()
{
if(top==-1) return 0;
return stack[top--];
}
int main()
{
char str[50001],tmp;
int i,a;
gets(str);
for(i=0;i<strlen(str);i++)
{
if(str[i]=='(')
{
push('(');
}
else
{
tmp=pop();
if(tmp!='(')
{
printf("bad");
return 0;
}
}
//printf("%d",top);
}
if(top==-1)
{
printf("good");
}
else
{
printf("bad");
}
return 0;
}
*/
/*
#include <stdio.h>
int stack[201],top=-1;
void push(int data)
{
stack[++top]=data;
}
int pop()
{
return stack[top--];
}
//12 22 3 * +
int main()
{
int i,st,a,b,num=0;
char str[201];
gets(str);
st=strlen(str);
for(i=0;i<st;i++)
{
if('0'<=str[i]&&str[i]<='9' )
{
num=num*10+str[i]-'0';
if(str[i+1]==' ')
{
push(num);
num=0;
}
}
else if(str[i]=='+')
{
a=pop();
b=pop();
push(b+a);
}
else if(str[i]=='*')
{
a=pop();
b=pop();
push(a*b);
}
else if(str[i]=='-')
{
a=pop();
b=pop();
push(b-a);
}
}
printf("%d",pop());
return 0;
}
*/
/*
#include <stdio.h>
int stack[201],top=-1;
void push(int data)
{
stack[++top]=data;
}
int pop()
{
if(top==-1) return 0;
return stack[top--];
}
void ttop()
{
if(top==-1)
{
printf("-1\n");
}
else
{
printf("%d\n",stack[top]);
}
}
void size()
{
printf("%d\n",top+1);
}
void empty()
{
if(top==-1)
{
printf("true\n");
}
else
{
printf("false\n");
}
}
int main()
{
char str[20];
int i,n,j,k,s=1,cnt,sum=0;
scanf("%d ",&n);
for(i=0;i<n;i++)
{
gets(str);
if(str[1]=='u') //push
{
for(j=6;str[j]!=' ';j++)
{
sum=sum*10+str[j]-'0';
}
push(sum);
sum=0;
}
else if(str[0]=='p') //pop
{
pop();
}
else if(str[0]=='t') //top
{
ttop();
}
else if(str[0]=='s') //size
{
size();
}
else //empty
{
empty();
}
}
}
*/