#include <iostream>
using namespace std;

template <class T>
class Some {
public:
	Some(T* other) : ptr(other) { } 
	
	template <typename R>
	Some(const Some<R>& other) {
		ptr = dynamic_cast<T*>(other.ptr);
	}
	
	T* operator->() const { return ptr; }

public:
	T* ptr;
};

class SGObject {
public:
	bool equals(Some<SGObject> other) {
		
	}
};

class Subclass : public SGObject {
public:
};
class OtherSubclass : public SGObject {
public:
};

int main() {
	Some<Subclass> one(new Subclass);
	Some<OtherSubclass> two(new OtherSubclass);
	return one->equals(two);
	// your code goes here
	return 0;
}