#pragma GCC optimize("O3")
#pragma G++ optimize("O3")
#include<stdio.h>
#include<string.h>
#include<algorithm>
#define N 200010
using namespace std;
struct Edge{ int v,nt; } G[N<<1];
int h[N],d[N],top[N],son[N],sz[N],Q;
int l[N],r[N],f[N],cnt=0,n,m,clk=0;
inline bool SON(int x,int y){ return l[x]<=l[y]&&r[y]<=r[x]; }
inline void adj(int x,int y){
G[++cnt]=(Edge){y,h[x]}; h[x]=cnt;
G[++cnt]=(Edge){x,h[y]}; h[y]=cnt;
}
void dfs(int x,int p){
d[x]=d[p]+1; f[x]=p; sz[x]=1;
for(int v,i=h[x];i;i=G[i].nt)
if((v=G[i].v)!=p){
dfs(v,x); sz[x]+=sz[v];
if(sz[v]>sz[son[x]]) son[x]=v;
}
}
void dijk(int x,int p){
top[x]=p; l[x]=++clk;
if(son[x]) dijk(son[x],p);
for(int v,i=h[x];i;i=G[i].nt)
if((v=G[i].v)!=f[x]&&v!=son[x]) dijk(v,v);
r[x]=++clk;
}
int Lca(int x,int y){
while(top[x]!=top[y]){
if(d[top[x]]>d[top[y]]) swap(x,y);
y=f[top[y]];
}
return d[x]>d[y]?y:x;
}
int main(){
scanf("%d%d%d",&n,&m,&Q);
for(int x,y,i=1;i<n;++i){
scanf("%d%d",&x,&y);
adj(x,y);
}
dfs(n/2,0); dijk(n/2,n/2);
//any things
}