#include <iostream>
#include <vector>
using namespace std;
void addEdge(vector<int> adj[], int x, int y)
{
if (x != y)
{
adj[x].push_back(y);
}
adj[y].push_back(x);
}
void printGraph(vector<int> adj[], int V)
{
cout << "lista: \n";
for (int v = 0; v < V; ++v)
{
cout << v+1 << ":";
for (auto x : adj[v])
cout << " " << x+1;
printf("\n");
}
}
int main()
{
int n, m; cin >> n >> m;
vector<int> adj[n];
int tablicaaa[n][n] = {0};
int x, y;
for (int i = 0; i < m; i++)
{
cin >> x >> y;
addEdge(adj, x-1, y-1);
tablicaaa[x-1][y-1] = 1;
tablicaaa[y-1][x-1] = 1;
}
printGraph(adj, n);
return 0;
}
// 5 7 0 1 0 4 1 2 1 3 1 4 2 3 3 4
//7 12 1 2 1 4 2 3 3 4 3 2 4 5 4 6 4 7 7 7 5 6 5 7 6 7
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}