#include <iostream>

    template<class T>struct identity{using type=T;};
    template<class T>using identity_t=typename identity<T>::type;

    template <typename T, template<class>class Z=identity_t>
    struct Yin {
      Z<T> *m_ptr;
    };

    template <typename T, template<class>class Z=identity_t>
    struct Yang {
      Z<T> *m_ptr;
    };

    template<
      template<class, template<class>class>class Yin,
      template<class, template<class>class>class Yang
    >
    struct flopper {
      template<class T> struct flip {
      	template<class U> using flop_t=typename flopper<Yang, Yin>::template flip_t<U>;
        using type = Yang<T, flop_t>;
      };
      template<class T> using flip_t=typename flip<T>::type;
    };

    using yin = Yin< void, flopper<Yin, Yang>::template flip_t >;
    using yang = Yang< void, flopper<Yang, Yin>::template flip_t >;


int main() {
	yin a={nullptr};
	yang b={&a};
	// your code goes here
	return 0;
}