while True: try: s = input().split() l = [] i = 0 while i < len(s): if s[i][0] != '"': l.append(s[i]) else: if s[i][-1] == '"': l.append(s[i][1:-1]) else: temp = s[i][1:] while s[i][-1] != '"': i += 1 temp += (" " + s[i]) l.append(temp[:-1]) i += 1 print(len(l)) for j in l: print(j) except: break