while True:
try:
s = input()
flag, temp, args = False, '', []
for c in s + ' ':
if c == '"':
# 如果遇到引号,若标志位flag被打开,则关闭;否则将其开启
flag = False if flag else True
continue
if c != ' ':
temp += c
else:
if flag:
temp += c
else:
args.append(temp)
temp = ''
print(len(args))
for a in args:
print(a)
except:
break