#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007

int N;
vector<int> G[100000];
P memo[100000];
P dfs(int x, int p, int r) {
  P m = P(r, x);
  for (int t : G[x]) if (t != p) m = max(m, dfs(t, x, r+1));
  return memo[x] = m;
}

vector<int> seq;
void dfs2(int x, int p) {
  int deg = 0;
  for (int t : G[x]) if (t != p && memo[x] != memo[t]) deg++;
  seq.pb(deg);

  for (int t : G[x]) if (t != p && memo[x] == memo[t]) dfs2(t, x);
}

vector<int> solve(vector<int> seq) {
  int n = 0;
  vector<int> ret;
  for (int deg : seq) {
    int id = n++;
    rep(_, deg) ret.pb(n++);
    ret.pb(id);
  }
  return ret;
}

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N;
  rep(i, N-1) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    G[u].pb(v);
    G[v].pb(u);
  }
  int u = dfs(0, -1, 0)._2;
  int v = dfs(u, -1, 0)._2;
  // u<->v
  dfs2(u, -1);
  int sum = seq.size();
  for (int x : seq) sum += x;
  if (sum != N) {
    cout << -1 << "\n";
  }
  else {
    vector<int> rev(seq); reverse(all(rev));
    vector<int> ans = min(solve(seq), solve(rev));
    for (int x : ans) cout << x+1 << " ";
    cout << "\n";
  }
  return 0;
}
