let str;
while ((str = readline())) {
let arr;
arr = [];
let flag = false;
let word = "";
for (let i = 0; i < str.length; i++) {
if (str[i] === '"') {
flag = !flag;
} else if (str[i] == " " && !flag) {
arr.push(word);
word = "";
} else {
word += str[i];
}
}
arr.push(word);
print(arr.length);
arr.forEach((el) => {
print(el);
});
}