import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextLine()) { // 注意 while 处理多个 case
String a = in.nextLine();
process(a);
}
}
private static void process(String str) {
List<String> list = new ArrayList<>();
for (int i = 0; i < str.length(); i++) {
//遇空格 i+1, 直到第i个字符不是空格
while (i< str.length() && str.charAt(i) == ' ') {
i++;
}
//如果第 i 个字符是‘"’ --> 截取引号中的字符串
if (str.charAt(i) == '"') {
int s = ++i;
while (i< str.length() && str.charAt(i) != '"') {
i++;
}
String child = str.substring(s, i);
list.add(child);
} else {
//普通场景, 截取下一个空格之前的字符串
int s = i;
while (i< str.length() && str.charAt(i) != ' ') {
i++;
}
String child = str.substring(s, i);
list.add(child);
}
}
System.out.println(list.size());
for(String s : list) {
System.out.println(s);
}
}
}