/**
 *    author:  otera    
**/
#include<iostream>
#include<string> 
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm> 
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int n;
vector<vector<int>> g;
vector<int> pre;

void dfs(int v, int p, vector<int>& dist) {
    for(int nv: g[v]) {
        if(nv == p) continue;
        if(chmin(dist[nv], dist[v] + 1)) {
            dfs(nv, v, dist);
            pre[nv] = v;
        }
    }
}

void solve() {
	cin >> n;
    vector<int> deg(n, 0);
    g.assign(n, vector<int>());
    rep(i, n - 1) {
        int u, v; cin >> u >> v;
        -- u, -- v;
        g[u].pb(v);
        g[v].pb(u);
        deg[u] ++, deg[v] ++;
    }
    vector<int> dist(n, inf);
    dist[0] = 0;
    pre.assign(n, -1);
    dfs(0, -1, dist);
    int ma = -1, j = -1;
    rep(i, n) {
        if(chmax(ma, dist[i])) {
            j = i;
        }
    }
    vector<int> dist1(n, inf);
    pre.assign(n, -1);
    dist1[j] = 0;
    dfs(j, -1, dist1);
    ma = 0;
    int k = -1;
    rep(i, n) {
        if(chmax(ma, dist1[i])) {
            k = i;
        }
    }
    int cur = k;
    vector<int> dia(1, cur);
    vector<bool> check(n, 0);
    check[cur] = 1;
    while(pre[cur] != -1) {
        cur = pre[cur];
        dia.pb(cur);
        check[cur] = 1;
    }
    rep(i, n) {
        if(check[i]) continue;
        bool ok = 0;
        for(int nv: g[i]) {
            if(check[nv]) ok = 1;
        }
        if(!ok) {
            cout << -1 << endl;
            return;
        }
    }
    vector<int> co;
    rep(i, (int)dia.size()) {
        if(i == 0 || i == (int)dia.size() - 1) {
            co.push_back(1);
        } else {
            co.push_back(deg[dia[i]] - 1);
        }
    }
    auto revco = co;
    reverse(all(revco));
    if(co > revco) swap(co, revco);
    cur = 1;
    for(int x: co) {
        for(int i = cur + 1; i < cur + x; ++ i) {
            cout << i << " ";
        }
        cout << cur << " ";
        cur += x;
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}

Measured memory_bytes: 19480