#include <iostream>
#include <string>
using namespace std;

struct skipcharsHelper
{
    string &str;
};

istream& operator>>(istream& stream, skipcharsHelper output)
{
    string temp;
    if (stream >> temp) {
        for (size_t i = 0; i < temp.size(); i += 10) {
            output.str += temp.substr(i, 5);
        }
    }
    return stream;
}

skipcharsHelper skipchars(string &str)
{
    return skipcharsHelper{str};
}

int main()
{
    string str;
    cout << "enter smth:\n";
    cin >> skipchars(str);
    cout << "entered string: " << str;
    return 0;
}