// #define DEBUGGING
#include <bits/stdc++.h>
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
using ll = std::int64_t;
using ull = std::uint64_t;
using PLL = std::pair<ll, ll>;
using TLL = std::tuple<ll, ll, ll>;
template <typename T> using V = std::vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return std::min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return std::max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return std::max(low, std::min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { return t = clamp(t, low, high); }
namespace init__ { struct InitIO { InitIO() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(30); } } init_io; }
#define mv_rec make_v(init, tail...)
template <typename T> T make_v(T init) { return init; }
template <typename T, typename... Tail> auto make_v(T init, size_t s, Tail... tail) { return V<decltype(mv_rec)>(s, mv_rec); }
#undef mv_rec
using namespace std;

#ifdef DEBUGGING
#include "../../debug/debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

const size_t SIZE = 1e5 + 10;
ll N;
V<ll> edges[SIZE], redges[SIZE], ans;
bool is_leaf[SIZE];

V<ll> build(ll start, ll goal) {
    DEBUG(make_tuple(start, goal));
    V<ll> ret(N);
    bool watched[SIZE] = {};
    ll cnt = 1;
    ll idx = 0;
    ll cur = edges[start][0];
    DEBUG(cur);
    ret[idx++] = cnt++;
    ret[N - 1] = N;
    watched[start] = watched[goal] = true;
    while (true) {
        watched[cur] = true;
        ll tmp = cnt++;
        for (ll nxt : edges[cur]) {
            if (!is_leaf[nxt]) continue;
            if (watched[nxt]) continue;
            watched[nxt] = true;
            ret[idx++] = cnt++;
        }
        ret[idx++] = tmp;
        bool ok = false;
        for (ll nxt : edges[cur]) if (!watched[nxt]) {
            ok = true;
            cur = nxt;
            break;
        }
        if (!ok) break;
    }
    return ret;
}

bool solve() {
    cin >> N;
    for (ll i = 1; i < N; i++) {
        ll u, v;
        cin >> u >> v;
        u--; v--;
        edges[u].push_back(v);
        edges[v].push_back(u);
    }

    if (N == 2) {
        ans.push_back(2);
        ans.push_back(1);
        return true;
    }

    for (ll i = 0; i < N; i++) is_leaf[i] = (edges[i].size() == 1);

    ll leaf = -1;
    ll cnt = 0;
    for (ll f = 0; f < N; f++) {
        if (is_leaf[f]) continue;
        cnt++;
        for (ll t : edges[f]) if (!is_leaf[t]) redges[f].push_back(t);
        if (redges[f].size() == 1) leaf = f;
    }

    ll start, goal;
    if (leaf != -1) {
        ll pre = -1;
        ll cur = leaf;
        while (true) {
            cnt--;
            ll ncnt = 0;
            ll nxt = -1;
            for (ll t : redges[cur]) if (t != pre) {
                ncnt++;
                nxt = t;
            }
            if (2 <= ncnt) return false;
            if (nxt == -1) break;
            pre = cur;
            cur = nxt;
        }

        if(cnt) return false;

        for (ll nxt : edges[leaf]) if (is_leaf[nxt]) {
            start = nxt;
            break;
        }
        for (ll nxt : edges[cur]) if (is_leaf[nxt]) {
            goal = nxt;
            break;
        }
    } else {
        ll cen = -1;
        for (ll i = 0; i < N; i++) if (!is_leaf[i]) {
            cen = i;
            break;
        }
        start = edges[cen][0], goal = edges[cen][1];
    }

    DEBUG(make_tuple(start, goal));
    V<ll> v1 = build(start, goal), v2 = build(goal, start);
    DEBUG(v1, v2);
    ans = move(v1);
    for (ll i = 0; i < ans.size(); i++) {
        if (v2[i] < ans[i]) {
            ans = move(v2);
            break;
        } else if (ans[i] < v2[i]) {
            break;
        }
    }

    return true;
}

int main() {
    if (solve()) {
        for (ll i = 0; i < N; i++) cout << ans[i] << " \n"[i + 1 == N];
    } else {
        cout << -1 << endl;
    }
    return 0;
}


Measured memory_bytes: 12928