#include<bits/stdc++.h>
using namespace std;
int main(){
//定义变量,初始化
string a,b;
int d,x,s,f,el;
d=x=s=f=el=0;
cin>>a;
a+=','; //给a补充一个',',否则判断不到最后一个
for(int i=0;i<=a.size();i++){
//计数
if(a[i]!=','){
if(a[i]>='a' && a[i]<='z'){
x++;
}
else if(a[i]>='A' && a[i]<='Z'){
d++;
}
else if(a[i]>='0' && a[i]<='9'){
s++;
}
else if(a[i]=='@' || a[i]=='!' || a[i]=='#' || a[i]=='$'){
f++;
}
//不要忘记判断其他情况
else{
el++;
}
b+=a[i];
}
else{
b+='\0'; //结尾必须为'\0'
//调试
//cout<<d<<" "<<x<<" "<<s<<" "<<f<<" "<<el<<" "<<b<<endl;
if(f>=1 && el==0){ //判断
if((d>0 && s>0) || (x>0 && s>0) || (d>0 && x>0)){
if(b.size()>=7 && b.size()<=13){
cout<<b<<endl;
}
}
}
//重置
b="";
d=x=s=f=0;
el=0;
//重置
}
}
return 0;
###### }