#include<bits/stdc++.h>
using namespace std;
#define reg register
typedef long long ll;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
static char buf[1<<21],*p1=buf,*p2=buf;
inline int read(void){
	reg char ch=getchar();
	reg int res=0;
	while(!isdigit(ch)) ch=getchar();
	while(isdigit(ch)) res=10*res+(ch^'0'),ch=getchar();
	return res;
}

const int MAXN=2e5+5;

int n;
vector<int> G[MAXN];
int fa[MAXN],dep[MAXN];

inline void dfs1(reg int u,reg int father){
	fa[u]=father;
	dep[u]=dep[father]+1;
	for(int v:G[u])
		if(v!=father)
			dfs1(v,u);
	return;
}

bool tag[MAXN];
int tim,dfn[MAXN];

inline void dfs2(reg int u,reg int father){
	dfn[u]=++tim;
	reg int son=0;
	for(int v:G[u])
		if(v!=father){
			if(!tag[v])
				dfs2(v,u);
			else
				son=v;
		}
	if(son)
		dfs2(son,u);
	++tim;
	return;
}

int main(void){
	n=read();
	for(reg int i=1;i<n;++i){
		static int u,v;
		u=read(),v=read();
		G[u].push_back(v),G[v].push_back(u);
	}
	dfs1(1,0);
	reg int rt=1;
	for(reg int i=2;i<=n;++i)
		if(dep[i]>=dep[rt])
			rt=i;
	dfs1(rt,0);
	reg int ptr=1;
	for(reg int i=2;i<=n;++i)
		if(dep[i]>=dep[ptr])
			ptr=i;
	while(ptr)
		tag[ptr]=true,ptr=fa[ptr];
	dfs2(rt,0);
	for(reg int i=1;i<=n;++i)
		printf("%d%c",dfn[i],i==n?'\n':' ');
	return 0;
}
#include<bits/stdc++.h>
using namespace std;

typedef pair<int,int> pii;
const int N=105;
const double eps=1e-7;
int n,m;
int X[N*3],Y[N*3],p[N*3];
pii XY[N];
pair<double,pii> e[N*N*9];

int fp(int x){
	return (x==p[x])?x:(p[x]=fp(p[x]));
}

void lnk(int x,int y){
	x=fp(x);y=fp(y);
	p[x]=y;
}

bool check(double d){
	for(int i=1;i<=n*3;i++) p[i]=i;
	for(int i=1;i<n;i++){
		lnk(i+n,i+1+n);
		lnk(i+n*2,i+1+n*2);
	}
	for(int i=1;i<=m;i++) if(e[i].first<d) lnk(e[i].second.first,e[i].second.second);
	for(int i=1;i<=n;i++) if(fp(i+n)==fp(i+2*n)) return false;
	return true;
}

int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d%d",X+i,Y+i);
		XY[i]=make_pair(X[i],Y[i]);
	}
	sort(XY+1,XY+1+n);
	for(int i=1;i<=n;i++){
		X[i]=XY[i].first;
		Y[i]=XY[i].second;
	}
	for(int i=1;i<=n;i++){
		X[i+n]=X[i+2*n]=X[i];
		Y[i+n]=-100;
		Y[i+2*n]=100;
	}
	for(int i=1;i<=n*3;i++) for(int j=i+1;j<=n*3;j++) e[++m]=make_pair(1.0*sqrt(1.0*(X[i]-X[j])*(X[i]-X[j])+1.0*(Y[i]-Y[j])*(Y[i]-Y[j])),make_pair(i,j));
	sort(e+1,e+1+m);
	double l=0.0,r=200.0;
	while(l<=r-eps){
		double mid=(l+r)/2;
		if(check(mid)) l=mid+eps;
		else r=mid-eps;
	}
	printf("%.7f\n",(l-eps)/2);
	return 0;
}