#include <iostream>
#include <list>
#include <vector>
using namespace std;
int main() {
int n = 2;
int v1, v2, v3;
vector<list<int>> lista(n);
for(int i =0 ;i < lista.size(); i++){
cin>>v1 >>v2 >>v3;
lista[v1].push_back(v3);
}
int index = 0;
for (auto podlista: lista){
cout<<++index<<": ";
for(auto element: podlista)
cout<<element;
cout<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGlzdD4KI2luY2x1ZGUgPHZlY3Rvcj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCgppbnQgbWFpbigpIHsKCWludCBuID0gMjsKCWludCB2MSwgdjIsIHYzOwoJdmVjdG9yPGxpc3Q8aW50Pj4gbGlzdGEobik7Cglmb3IoaW50IGkgPTAgO2kgPCBsaXN0YS5zaXplKCk7IGkrKyl7CgkJY2luPj52MSA+PnYyID4+djM7CgkJbGlzdGFbdjFdLnB1c2hfYmFjayh2Myk7Cgl9CglpbnQgaW5kZXggPSAwOwoJZm9yIChhdXRvIHBvZGxpc3RhOiBsaXN0YSl7CgkJY291dDw8KytpbmRleDw8IjogIjsKCQlmb3IoYXV0byBlbGVtZW50OiBwb2RsaXN0YSkKCQkJY291dDw8ZWxlbWVudDsKCQljb3V0PDxlbmRsOwoJfQoJcmV0dXJuIDA7Cn0=