#include <iostream>
#include <vector>
using namespace std;

int main() {
    string s;
    while (getline(cin, s)) {
        s += ' ';
        vector<string> arr;
        string com = "";
        int quot = 0;
        for (char c : s) {
            if (c == '"' && quot == 0) {
                quot++;
            } else if (c == '"' && quot == 1) {
                quot--;
            } else if (isspace(c) && quot == 0) {
                arr.push_back(com);
                com.clear();
            } else {
                com += c;
            }
        }

        cout << arr.size() << endl;
        for (auto str : arr)
            cout << str << endl;

    }

}