#include <iostream>
#include <string>
using namespace std;
class Str
{
public:
string li;
string mi;
Str( string a, string b );
Str operator +( const Str & c );
};
Str::Str( string a, string b )
{
li = a;
mi = b;
}
Str Str::operator +( const Str & c )
{
Str st( " ala ", " ola " );
st.li = st.li + c.li;
return st;
}
int main()
{
Str sr( " kaktus ", " torba " );
Str s( " wrzawa ", " slonecznik " );
sr = sr + sr;
s = s + s;
cout << sr.li << endl;
cout << s.li << endl;
cin.get();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgU3RyCnsKcHVibGljOgogICAgc3RyaW5nIGxpOwogICAgc3RyaW5nIG1pOwogICAgU3RyKCBzdHJpbmcgYSwgc3RyaW5nIGIgKTsKICAgIFN0ciBvcGVyYXRvciArKCBjb25zdCBTdHIgJiBjICk7Cn07ClN0cjo6U3RyKCBzdHJpbmcgYSwgc3RyaW5nIGIgKQp7CiAgICBsaSA9IGE7CiAgICBtaSA9IGI7Cn0KClN0ciBTdHI6Om9wZXJhdG9yICsoIGNvbnN0IFN0ciAmIGMgKQp7CiAgICBTdHIgc3QoICIgYWxhICIsICIgb2xhICIgKTsKICAgIHN0LmxpID0gc3QubGkgKyBjLmxpOwogICAgCiAgICByZXR1cm4gc3Q7Cn0KaW50IG1haW4oKQp7CiAgICBTdHIgc3IoICIga2FrdHVzICIsICIgdG9yYmEgIiApOwogICAgU3RyIHMoICIgd3J6YXdhICIsICIgc2xvbmVjem5payAiICk7CiAgICBzciA9IHNyICsgc3I7CiAgICBzID0gcyArIHM7CiAgICBjb3V0IDw8IHNyLmxpIDw8IGVuZGw7CiAgICBjb3V0IDw8IHMubGkgPDwgZW5kbDsKICAgIGNpbi5nZXQoKTsKICAgIHJldHVybiAwOwp9