#include<cstdio>
#include<cstring>
using namespace std;
// 用一个指针判断一下现在指向的位置就好了,不用栈
int main()
{
char b[105][105];
char str[10];
strcpy(b[0],"http://www.acm.org/");
int i=0,j;
while(scanf("%s",str)&&str[0]!='Q')
{
if(str[0]=='V') {
scanf("%s",b[++i]);
j = i;
}
else if(str[0]=='B')
i--;
else if(str[0]=='F')
i++;
if(i<0)
{
i++;
puts("Ignored");
}
else if(i>j)
{
i--;
puts("Ignored");
}
else puts(b[i]);
}
return 0;
}

京公网安备 11010502036488号