#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long LL;
const LL N = 300005;

LL ec = 0,hed[N] = {0},nxt[N << 1],to[N << 1];
void add_edge(LL f,LL t){
	++ ec; to[ec] = t; nxt[ec] = hed[f]; hed[f] = ec;
}

LL fa[N],dis[N] = {0},deg[N],vis[N] = {0};
LL a[N],ac = 0,b[N],n;

void dfs(LL u,LL f){
	fa[u] = f; dis[u] = dis[f] + 1;
	deg[u] = 0;
	for(LL i = hed[u];i;i = nxt[i]){
		LL v = to[i];
		if(v == f) continue;
		deg[u] ++;
		dfs(v,u);
	}
}

LL solve(){
	LL id = 0,ed = 0;
	dfs(1,0); for(LL i = 1;i <= n;i ++) if(dis[i] > dis[id]) id = i;
	dfs(id,0); for(LL i = 1;i <= n;i ++) if(dis[i] > dis[ed]) ed = i;
	deg[ed] = 1;
	while(ed){
		a[++ ac] = ed;
		vis[ed] = 1; ed = fa[ed];
	}
	for(LL i = 1;i <= ac;i ++) b[i] = a[ac + 1 - i];
	for(LL i = 1;i <= n;i ++) if(!vis[i] && deg[i]) return 1;
	for(LL i = 1;i <= ac;i ++) a[i] = deg[a[i]],b[i] = deg[b[i]];
	return 0;
}

LL comp(){
	for(LL i = 1;i <= n;i ++){
		if(a[i] > b[i]) return 1;
		if(a[i] < b[i]) return -1;
	}
	return 0;
}

int main(){
	ios::sync_with_stdio(false);
	LL u,v;
	cin >> n;
	for(LL i = 1;i < n;i ++){
		cin >> u >> v;
		add_edge(u,v);
		add_edge(v,u);
	}
	if(solve()){ cout << -1 << '\n'; return 0; }
	if(comp() == 1) swap(a,b);
    LL now = 1;
	for(LL i = 1;i <= ac;i ++){
		for(LL j = 1;j < a[i];j ++) cout << now + j << ' ';
		cout << now << ' '; now += a[i];
	} cout << '\n';
	return 0;
}