#include <iostream>
#include <vector>
using namespace std;
template <template <class T>class Agent, class Listener>
class App {
vector<Agent<Listener>> agents;
public:
App() : agents(10) {}
};
template <class T>
class MyAgent {
vector<T> listeners;
public:
MyAgent() : listeners(10) {}
};
class MyListener {
static int x;
public:
MyListener() { cout<<"L"<<++x<<endl;}
};
int MyListener::x;
int main() {
App<MyAgent, MyListener> app;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPHRlbXBsYXRlIDxjbGFzcyBUPmNsYXNzIEFnZW50LCBjbGFzcyBMaXN0ZW5lcj4KY2xhc3MgQXBwIHsKCXZlY3RvcjxBZ2VudDxMaXN0ZW5lcj4+IGFnZW50czsKcHVibGljOiAKICAgIEFwcCgpIDogYWdlbnRzKDEwKSB7fQp9OwoKdGVtcGxhdGUgPGNsYXNzIFQ+IApjbGFzcyBNeUFnZW50IHsKICAgIHZlY3RvcjxUPiBsaXN0ZW5lcnM7IApwdWJsaWM6IAogICBNeUFnZW50KCkgOiBsaXN0ZW5lcnMoMTApIHt9Cn07CgpjbGFzcyBNeUxpc3RlbmVyIHsKCXN0YXRpYyBpbnQgeDsgCnB1YmxpYzogCiAgICBNeUxpc3RlbmVyKCkgeyBjb3V0PDwiTCI8PCsreDw8ZW5kbDt9Cn07CmludCBNeUxpc3RlbmVyOjp4OwoKaW50IG1haW4oKSB7CglBcHA8TXlBZ2VudCwgTXlMaXN0ZW5lcj4gYXBwOwoJcmV0dXJuIDA7Cn0=