#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
    ofstream fout("foo.txt");
    fout << "foo" << ' ' << 6 << ' ' << 'c' << endl;
    fout.close();

    ifstream fin("foo.txt");
    string s;
    int i;
    char c;

    fin >> s >> i >> c;
    cout << s << ' ' << i << ' ' << c << endl;
}
