#include <iostream>
using namespace std;
template <typename T> class Counter {
public:
Counter() {
cout << ++x;
}
static int x;
};
template <typename T> int Counter<T>::x;
int main() {
Counter<int> a;
Counter<int> b;
Counter<double> c;
Counter<Counter<double>> d;
return 0;
}