#include <iostream>
#include <sstream>
#include <cassert>
#include <array>
#include <limits>
#include <set>
#include <unordered_map>
#include <functional>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#include <map>
#include <optional>
#include <chrono>
#include <mutex>
#include <thread>
#include <utility>
#include <typeinfo>
using namespace std;
int main()
{
std::stringstream ss;
ss << "123" << "\n"
<< "456";
cout << ss.str() << endl;
assert(ss.str() == "123\n456");
cout << "ok" << endl;
return 0;
}