#include <cstdio>
#include <cassert>
#include <vector>
#include <algorithm>

using namespace std;

#define m 100100

int n, u[m], p[m];
vector <int> c[m];

void dfs( int u, int p )
{
  
}

int main()
{
  freopen("collider.in", "r", stdin);
  freopen("collider.out", "w", stdout);
  scanf("%d", &n);
  assert(3 <= n && n <= 100000);
  for (int i = 1; i < n; i++)
  {
    int a, b;
    scanf("%d%d", &a, &b), a--, b--;
    c[a].push_back(b);
    c[b].push_back(a);
  }
  return 0;
}
