import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.nextLine();
StringBuilder sb = new StringBuilder();
List<String> res = new ArrayList<>();
boolean flag = false;
for (char ch : str.toCharArray()) {
if (ch == '\"') {
flag = flag ? false : true;
continue;
}
if (ch == ' ' && !flag) {
res.add(sb.toString());
sb = new StringBuilder();
} else
sb.append(ch);
}
res.add(sb.toString());
System.out.println(res.size());
for (String s : res) {
System.out.println(s);
}
}
}