import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class Main {
// u "a e i o u" r
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
String[] array = str.split(" ");
List<String> results = new LinkedList<>();
StringBuilder stringBuilder = new StringBuilder();
//是否等待后半个“
boolean isWait = false;
for (int i = 0; i < str.length(); i++) {
char c = str.toCharArray()[i];
if (c == '\"') {
isWait = !isWait;
if (i == str.length() - 1) {
results.add(stringBuilder.toString());
}
} else if (c == ' ') {
if (isWait) {
stringBuilder.append(c);
} else {
results.add(stringBuilder.toString());
stringBuilder.delete(0, stringBuilder.length());
}
} else {
stringBuilder.append(c);
if (i == str.length() - 1) {
results.add(stringBuilder.toString());
}
}
}
System.out.println(results.size());
for (String s : results) {
System.out.println(s);
}
}
}