#include<stdio.h>
#define SIZE 10
double stack[SIZE];
int sp;
void push(double value);
double pop(void);
int isFull(void);
int isEmpty(void);
void answer(void);
void reset(void);
int main(void)
{
reset();
while(1){
int num;
double x,cal1,cal2;
if (scanf("%d", &num) != 1)
    break;
switch(num){
case 1:
 cal1=pop();
 cal2=pop();
 push(cal1+cal2);
 break;
case 2:
 cal1=pop();
 cal2=pop();
 push(cal2-cal1);
 break;
case 3:
 cal1=pop();
 cal2=pop();
 push(cal1*cal2);
 break;
case 4:
 cal1=pop();
 cal2=pop();
 push(cal2/cal1);
 break;
case 5:
 scanf("%lf",&x);
 push(x);
printf("data%d:%f\n",sp,stack[sp-1]);
 break;
case 9:
 answer();
 break;
}}
return 0;
}

void push(double value)
{if (isFull()==1)
   printf("スタックが満杯で入りませんでした");
 else
   {stack[sp]=value;
   sp++;}

}
double pop(void)
{if (isEmpty()==1)
    {printf("スタックが空で取り出せませんでした");
    return 0;}
 else
    {sp--;
     return stack[sp];}

}
int isFull(void)
{if(sp==SIZE)
   return 1;
 else
   return 0;

}
int isEmpty(void)
{if(sp==0)
   return 1;
 else
   return 0;


}
void answer(void)
{if(isEmpty()==1)
  printf("スタックが空です");
else
printf("answer:%f\n",stack[sp-1]);

}
void reset(void)
{sp=0;
} 