# print('a b c "ac" d e "gh"'.split('"'))
# >>['a b c ', 'ac', ' d e ', 'gh', '']# 注意此时会split出一个''空字符串
string=input()
if string.count('"')==0:
print(len(string.split()))
for word in string.split():
print(word)
else:
lt=string.split('"')
lt_left=lt[0].split()
lt_right=lt[-1].split()
lt_new=lt_left+lt[1:-1]+lt_right
n=len(lt_new)-lt_new.count('')-lt_new.count(' ')
print(n)
for w in lt_new:
if w !='' or w!=' ':
print(w)
# >>['a b c ', 'ac', ' d e ', 'gh', '']# 注意此时会split出一个''空字符串
string=input()
if string.count('"')==0:
print(len(string.split()))
for word in string.split():
print(word)
else:
lt=string.split('"')
lt_left=lt[0].split()
lt_right=lt[-1].split()
lt_new=lt_left+lt[1:-1]+lt_right
n=len(lt_new)-lt_new.count('')-lt_new.count(' ')
print(n)
for w in lt_new:
if w !='' or w!=' ':
print(w)