s =list(input().split(','))
a =[]for i in s:
k,l,m,n =0,0,0,0
i =[str(x)for x in i]if6<=len(i)<=12:for j in i:if j.isnumeric():
k = k+1elif j.islower():#小写
l = l+1elif j.isupper():#大写
m = m+1elif j =='$'or j=='#'or j=='@':
n = n+1if k!=0and l!=0and m!=0and n!=0:
a.append(''.join(i))print(''.join(a))
Solution:
import re
value =[]
items=[x for x ininput().split(',')]for p in items:iflen(p)<6orlen(p)>12:continueelse:passifnot re.search("[a-z]",p):continueelifnot re.search("[0-9]",p):continueelifnot re.search("[A-Z]",p):continueelifnot re.search("[$#@]",p):continueelif re.search("\s",p):continueelse:pass
value.append(p)print(",".join(value))