#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>

using namespace std;

class CsvLineParser {
public:
    typedef boost::char_separator<char> BOOST_CHAR_SEP;
    typedef boost::tokenizer< BOOST_CHAR_SEP > BOOST_TOKENIZER;
    static std::vector<string> parse(string line) {
        std::vector<string> ret;
        BOOST_CHAR_SEP sep(" ");
        BOOST_TOKENIZER tokens(line, sep);
        BOOST_FOREACH(string s, tokens) {
            ret.push_back(s);
        }
        return ret;
    }
};

int main() {
    ifstream ifs("hoge.txt");
    string buffer;
    
    while(getline(ifs, buffer)) {

        std::vector<string> p = CsvLineParser::parse(buffer);

        for(int i=0; i<p.size(); i++) {
            cout << p.at(i) << endl;
        }
    }
}