#55616: c++ stringstream


61247091s@gapps.ntnu.edu.tw (wei)


#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    string s1,s2,word;
    getline(cin,s1);
    getline(cin,s2);

    stringstream ss(s1);
    bool first=true;
   
    while(ss>>word){
        if(!first)cout<<" "<<s2<<" ";
        cout<<word;
        first=false;
    }
    return 0;
}