#include <iostream>

using namespace std;

class mendl
    {
    public:
        explicit mendl(unsigned int i) : n(i) {}
    private:
        unsigned int n;

        template <class charT, class Traits>
        friend basic_ostream<charT,Traits>& operator<< (basic_ostream<charT,Traits>& os, const mendl& w)
        {
            // the manipulation: insert end-of-line characters and flush
            for (int i=0; i<w.n; i++)
                os << '\n';
            os.flush();
            return os;
        }
    };


int main()
{
    cout << "ere" << mendl(5) << "dfd";
    return 0;
}