#include <iostream>
using namespace std;
#include <cstdlib>
//#include <map>
template <class type>
class Trep {
public:
type key;
int priority, size;
Trep *left, right;
Trep(type _key) :
key(_key), priority(rand()), size(1), left(NULL), right(NULL) {}
typedef std::pair<Trep<type>, Trep<type> > TrepPair; //error!
TrepPair splited(Trep &root, type key);
Trep* insert(Trep &root, Trep &node);
};
int main() {
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojaW5jbHVkZSA8Y3N0ZGxpYj4KLy8jaW5jbHVkZSA8bWFwPgoKdGVtcGxhdGUgPGNsYXNzIHR5cGU+CmNsYXNzIFRyZXAgewoKICAgIHB1YmxpYzoKICAgIHR5cGUga2V5OwogICAgaW50IHByaW9yaXR5LCBzaXplOwogICAgVHJlcCAqbGVmdCwgcmlnaHQ7CgogICAgVHJlcCh0eXBlIF9rZXkpIDoKICAgICAgICBrZXkoX2tleSksIHByaW9yaXR5KHJhbmQoKSksIHNpemUoMSksIGxlZnQoTlVMTCksIHJpZ2h0KE5VTEwpIHt9CgoKICAgIHR5cGVkZWYgc3RkOjpwYWlyPFRyZXA8dHlwZT4sIFRyZXA8dHlwZT4gPiBUcmVwUGFpcjsgLy9lcnJvciEKICAgIAogICAgVHJlcFBhaXIgc3BsaXRlZChUcmVwICZyb290LCB0eXBlIGtleSk7CiAgICBUcmVwKiBpbnNlcnQoVHJlcCAmcm9vdCwgVHJlcCAmbm9kZSk7Cgp9OwoKaW50IG1haW4oKSB7CiAgICByZXR1cm4gMDsKfQ==