#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int lenstr,i,top;
char str[255],a[255];
while(gets(str)!=NULL)
{
lenstr=strlen(str);
top=0;
for(i=0;i<=lenstr-1;i++)
{
if(str[i]!='#'&&str[i]!='@')
{
a[top++]=str[i];
}
if(str[i]=='@')
{
top=0;
}
if(str[i]=='#')
{
if(top!=0)
top--;
}
}
for(i=0;i<top;i++)
cout<<a[i];
printf("\n");
}
return 0;
}