#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
int main() {
string input = "1 2 3 4 5"; // Space-separated string of integers
vector<int> nums;
// Create a stringstream object with the input string
stringstream ss(input);
int temp;
// Extract integers from the stringstream and add them to the vector
while (ss >> temp) {
nums.push_back(temp);
}
// Output the vector contents
for (int num : nums) {
cout << num << " ";
}
return 0;
}