#include<iostream>
#include<ostream>
using namespace std;
int main(){
string s,t;
cin>>s;
s+=',';
for(int i=0;i<s.size();i++){
if(s[i]','){
if(t.empty()0){
int e=t.size();
if(e>5 and e<13){
int upper=0,lower=0,digit=0,other=0,qaq=1;//other为其他符号,qaq为检测密码字符合规
for(int j=0;j<e;j++){
char q=t[j];
if(isupper(q))upper++;
else if(islower(q))lower++;
else if(isdigit(q))digit++;
else if(q'!' or q'@' or q=='#' or q=='$')other++;
else{
qaq=0;
break;
}
}
if(qaq==1 and other>0){
int cnt=0;
if(upper)cnt++;
if(lower)cnt++;
if(digit)cnt++;
if(cnt>=2){
cout<<t<<endl;
}
}
}
}
t="";//这里必须重置,否则只会检测第一段(别问为啥知道)
}
else t+=s[i];
}
}