#include<iostream> #include<stdio.h> #include<string> #include<cstring> #define maxn 150 using namespace std; char mapn[maxn][maxn]; int main() { char str[150]; while(gets(str)!=NULL) { int sum; for(int i=0;i<strlen(str);) { sum = 0; if(str[i] == '!') printf(" "); while(str[i]>='0'&&str[i]<='9')//数字累加,11累加为2 { sum += str[i] - '0'; i++; } if(str[i] == 'b') str[i] = ' '; for(int j=0;j<sum;j++) printf("%c",str[i]); i++; } printf(" "); } return 0; }