#include <iostream>
#include <list>
#include <vector>

int main() {
    std::list<int> mylist;
    std::vector<int> myvector = {1, 2, 3, 4, 5};

    mylist.assign(myvector.begin(), myvector.end());

    for (int val : mylist) {
        std::cout << val << " ";
    }
    return 0;
}