//seHJ12!@,sjdkffH$123,sdf!@&12HDHa!,123&^YUhg@!,1444444444442#hA
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100]={};
cin>>a;
int t=0,t1=0,t2=0,t3=0;
int k=0;
int s=0;
for (int i=0;i<strlen(a);i++)
{
if(a[i]==',')
{
if(t+t1+t2>=2 && t3==1 && k-s<=12 && k-s>=6)
{
for(int j=s;j<=k-1;j++)
{
cout<<a[j];
}
s=k+1;
cout<<endl;
}
k+=1;
t=0,t1=0,t2=0,t3=0;
}
else
{
if(a[k]>='a' && a[k]<='z')
t=1;
if(a[k]>='A' && a[k]<='Z')
t1=1;
if(a[k]>='0' && a[k]<='9')
t2=1;
if(a[k]=='!' || a[k]=='@' || a[k]=='#' || a[k]=='$')
t3=1;
k++;
}
}
}