def jiexi(s):
# xcopy /s "C:\\program files" "d:\"
res = []
if '"' not in s: # 如果不含"",可以直接按空格分割
res = s.split(' ')
return res
else:
ls = s.split('"') # 如果含"",按"分割肯定能分成3组,中间是引号内容
if ls[0] == '': # 排除"位于字符首位
pass
elif ' ' in ls[0]: # 有空格继续按空格分割
res.extend(ls[0].strip().split(' '))
else:
res.append(ls[0])
res.append(ls[1])
if ls[-1] == '': # 排除"位于字符尾部
pass
elif ' ' in ls[-1]: # 有空格继续按空格分割
res.extend(ls[-1].strip().split(' '))
else:
res.append(ls[-1])
return res
while True:
try:
s = input()
res = jiexi(s)
print(len(res))
for i in res:
print(i)
except:
break