#include<stdio.h>
#include<string.h>
int n1(char a[10])
{
if(strcmp(a,"零")==0) return 0;
else if(strcmp(a,"一")==0) return 1;
else if(strcmp(a,"二")==0) return 2;
else if(strcmp(a,"三")==0) return 3;
else if(strcmp(a,"四")==0) return 4;
else if(strcmp(a,"五")==0) return 5;
else if(strcmp(a,"六")==0) return 6;
else if(strcmp(a,"七")==0) return 7;
else if(strcmp(a,"八")==0) return 8;
else if(strcmp(a,"九")==0) return 9;
else if(strcmp(a,"十")==0) return 10;
}
if(strcmp(name1,name)==0){
scanf("%s",oper);
if(strcmp(oper,"增加")==0){
scanf("%s",numb);
a=jud(numb);
a+=a;}
if(strcmp(oper,"减少")==0){
scanf("%s",numb);
if(strlen(numb)==2)
{
a=jud(numb);
a-=a;
}
}
char n2(int else if(strcmp(name1,"看看")==0)
{
int lasttmp;
scanf("%s",name);
lasttmp=trans(numb2);
int len=strlen(word);
int len1=strlen(cold);
{
if(sum>=lasttmp)
{ if(sum>=0&&sum<=10){
printf("%s\n",chinese[sum]);
scanf("%s %s %s %s %s %s %s %s %s %s",a,name,b,up,down,left,right);b)
{
if(b==0) printf("零");
else if(b==1) printf("一");
else if(b==2) printf("二");
else if(b==3) printf("三");
else if(b==4) printf("四");
else if(b==5) printf("五");
else if(b==6) printf("六");
else if(b==7) printf("七");
else if(b==8) printf("八");
else if(b==9) printf("九");
else if(b==10) printf("十");
return 0;
}
int main()
{
int n1(char a[10]);
int add(char a[10],int x,int y);
char n2(int b);
char left[10],down[10],up[10],right[10];
int m,n;
scanf("%s %s %s %s",&left,&down,&up,&right);
m=n1(right);
while(1)
{
scanf("%s",left);
if(strcmp(left,"看看")==0)
{
scanf("%s",down);
break;
}
else
{
scanf("%s %s",down,up);
n=n1(up);
m=add(down,m,n);
}
}
n2(m);
return 0;
}