#include <iostream>
#include <unordered_set>
#include <functional>
#include <cassert>
struct TTest {
char essence;
mutable void* aux_nohash;
bool operator == (const TTest& other) const { if(!aux_nohash) aux_nohash = NULL; return this->essence == other.essence; }
};
namespace std {
template<> struct hash<TTest> {
size_t operator() (const TTest& val) const { return std::hash<char>()(val.essence); };
};
} // namespace std
int main() {
TTest dick1 {'1', NULL};
TTest dick2 {'2', &stdin};
TTest dick3 {'3', NULL};
TTest dick4 {'2', &dick1};
std::hash<TTest> hash;
assert(hash(dick1) != hash(dick2));
assert(hash(dick2) == hash(dick4));
assert(hash(dick1) != hash(dick3));
std::unordered_set<TTest> your_anus;
your_anus.insert(dick1);
your_anus.insert(dick2);
your_anus.insert(dick3);
assert(your_anus.count(dick4) < 1);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dW5vcmRlcmVkX3NldD4KI2luY2x1ZGUgPGZ1bmN0aW9uYWw+CiNpbmNsdWRlIDxjYXNzZXJ0PgoKc3RydWN0IFRUZXN0IHsKICAgIGNoYXIgZXNzZW5jZTsKICAgIG11dGFibGUgdm9pZCogYXV4X25vaGFzaDsKICAgIAogICAgYm9vbCBvcGVyYXRvciA9PSAoY29uc3QgVFRlc3QmIG90aGVyKSBjb25zdCB7IGlmKCFhdXhfbm9oYXNoKSBhdXhfbm9oYXNoID0gTlVMTDsgcmV0dXJuIHRoaXMtPmVzc2VuY2UgPT0gb3RoZXIuZXNzZW5jZTsgfQp9OwoKbmFtZXNwYWNlIHN0ZCB7CnRlbXBsYXRlPD4gc3RydWN0IGhhc2g8VFRlc3Q+IHsKICAgIHNpemVfdCBvcGVyYXRvcigpIChjb25zdCBUVGVzdCYgdmFsKSBjb25zdCB7IHJldHVybiBzdGQ6Omhhc2g8Y2hhcj4oKSh2YWwuZXNzZW5jZSk7IH07Cn07Cn0gLy8gbmFtZXNwYWNlIHN0ZAoKaW50IG1haW4oKSB7CiAgICBUVGVzdCBkaWNrMSB7JzEnLCBOVUxMfTsKICAgI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