s=input().strip()
loca=[]
for i in range(len(s)):
    if s[i]=='"':
        loca.append(i)
sl=list(s)
for i in range(0,len(loca)//2,2):
   for sp in range(loca[i]+1,loca[i+1]):
       if sl[sp]==' ':
           sl[sp]='*any_strange_string*'
s2= ''.join(sl)
sl2=s2.split()
print(len(sl2))
for w in range(len(sl2)):
    if '*any_strange_string*' in sl2[w]:
        sl2[w]=sl2[w].replace('*any_strange_string*',' ')
    print(sl2[w].strip('"'))