import sys line=sys.stdin.readline()[:-1] stack=[] cmds=[] cmd=[] for c in line: if c=='"': if len(stack)!=0: stack.pop(0) else: stack.append('"') elif c==' ' and len(stack)==0: cmd_string=''.join(cmd) cmds.append(cmd_string) cmd=[] else: cmd.append(c) cmd_string=''.join(cmd) cmds.append(cmd_string) print(len(cmds)) for cmd in cmds: print(cmd) # print(cmds)