stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#pragma GCC optimize("O2")

using namespace std;



# define mp make_pair

# define pb push_back

# define PI acos(-1)

# define ff first 

# define ss second 

# define endl '\n'

# define vt vector

# define all(c) (c).begin(), (c).end()

# define rep(i,a,b) for(int i = a ; i < b ; ++i)



typedef long long ll ; 

typedef long double ld ; 

typedef pair<int,int> pii ; 

typedef pair<ll,ll> pll ;



template<class T> bool umin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }

template<class T> bool umax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }



const int MOD = 1e9+9 ;

const ll inf = 1e18 ;  

const ll mod = 1e9+7 ;  



ll nCr(ll n,ll r){ll t=1;if(r>n)return 0;if(r>n-r)r=n-r;for(ll i=0;i<r;i++){t*=(n-i);t/=(i+1);}return t;}

ll power(ll a, ll n) { ll r=1;while(n){if(n&1)r=(r*a)%MOD;n>>=1;a=(a*a)%MOD;}return r%MOD;}







vt<pii> dir =  {{-1,0} , {1, 0} , {0,-1} , {0,1}} ; 



// ==========Start Here==============



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(NULL) ; 

 		

 	int n ; 

 	cin >> n ; 

 	map<int,int> present ;

 	bool ok = 1 ; 

 	vt<int> a(n) ; 

 	rep(i,0,n) {

 		cin >> a[i] ; 

 		if(present[a[i]]) 

 			ok = 0 ; 

 		present[a[i]]++; 

 	}

 	if(ok) {

 		cout << "YES" ; 

 	} else {

 		cout << "NO" ; 

 	}





	return 0 ; 

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<algorithm>

using namespace std;

int a[200000];

int main()

{

	int i,n,flag=0;

	scanf("%d",&n);

	for(i=0;i<n;i++)

	{

	  scanf("%d",&a[i]);

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

	   if(a[i]==a[i+1])

	   {

	      flag=1;

	      break;

	   }

	}

	if(flag==1)

	{

		printf("NO\n");

	}

	else

	{

		printf("YES\n");

	}

	return 0;	

 } 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include <bits/stdc++.h>

#include<algorithm>

#include <cstring>

#define endl "\n"

#define SRK ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

#define EPS 1e-6

typedef long long ll;

using namespace std;







int main()

{

    SRK;

    int n,x,i;

    cin >> n;

    set <int> st;

    for (i = 0; i < n; i++)

    {

        cin >> x;

        st.insert(x);

    }

    if (st.size() == n)

    {

        cout << "YES\n";

    }

    else

    {

        cout << "NO\n";

    }







}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<algorithm>

using namespace std;

int a[200000];

int main()

{

	int i,n,flag=0;

	scanf("%d",&n);

	for(i=0;i<n;i++)

	{

	  scanf("%d",&a[i]);

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

	   if(a[i]==a[i+1])

	   {

	      flag=1;

	      break;

	   }

	}

	if(flag==1)

	{

		printf("NO\n");

	}

	else

	{

		printf("YES\n");

	}

	return 0;	

 } 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



typedef long long ll;



#define faster ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)

#define read freopen("in.txt","r",stdin)

#define write freopen("out.txt","w",stdout)

#define mem(x,n) memset(x,n,sizeof(x))

#define all(x) x.begin(), x.end()

#define endl "\n"



int main()

{

	faster;



	int n;

	cin >> n;



	set<int> a;

	for(int i = 0; i < n; i++){

		int in;

		cin>>in;

		a.insert(in);

	}



	if(n == a.size()) cout << "YES" << endl;

	else cout << "NO" << endl;



	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<algorithm>

using namespace std;

int a[200000];

int main()

{

	int i,n,flag=0;

	scanf("%d",&n);

	for(i=0;i<n;i++)

	{

	  scanf("%d",&a[i]);

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

	   if(a[i]==a[i+1])

	   {

	      flag=1;

	      break;

	   }

	}

	if(flag==1)

	{

		printf("NO\n");

	}

	else

	{

		printf("YES\n");

	}

	return 0;	

 } 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



typedef long long ll;



using namespace std;



int main()

{

    //ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);



    //freopen("in.txt","r",stdin);

    //freopen("out.txt","w",stdout);



    set <int> s;

    int N;

    cin >> N;



    int a;

    for(int i=0; i<N; i++)

    {

        cin >> a;

        s.insert(a);

    }



    if(s.size() != N)

    {

        cout << "NO" << endl;

    }



    else

    {

        cout << "YES" << endl;

    }



}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<algorithm>

using namespace std;

int a[200000];

int main()

{

	int i,n,flag=0;

	scanf("%d",&n);

	for(i=0;i<n;i++)

	{

	  scanf("%d",&a[i]);

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

	   if(a[i]==a[i+1])

	   {

	      flag=1;

	      break;

	   }

	}

	if(flag==1)

	{

		printf("NO\n");

	}

	else

	{

		printf("YES\n");

	}

	return 0;	

 } 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

map <int , int> freq;

int n;



int main() {

   scanf("%d" , &n);

   for (int i = 0 ; i < n ; i++) {

      int u; scanf("%d" , &u);

      freq[u]++;

   }

   bool distinct = true;

   for (auto it = freq.begin() ; it != freq.end() ; it++) {

      if ((*it).second > 1) {

         distinct = false;

      }

   }

   printf(distinct ? "YES\n" : "NO\n");

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<algorithm>

using namespace std;

int a[200010];

int main()

{

	int n,i,flag=0;

	scanf("%d",&n);

	for(i=0;i<n;i++)

	{

		scanf("%d",&a[i]);

	}

	sort(a,a+n);

	for(i=0;i<n-1;i++)

	{

		if(a[i]==a[i+1])

		{

			flag=1;

			break;

		}

	}

	if(flag==1)

	{

		printf("NO\n");

	}

	else

	{

		printf("YES\n");

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<stdio.h>

#include<string.h>

#include<string>

#include<algorithm>

#include<map>

using namespace std;

map<int,int>cnt;

int main()

{

	int n;

	cin >>n;

	while(n--)

	{

		int  a;

		cin>>a;

		cnt[a]++;

	}

	int flag=0;

	for(map<int ,int>::iterator it=cnt.begin();it!=cnt.end();it++)

	{

		if(it->second!=1)

		{

			flag=1;

			break;

		}

		

	}

	if(flag)

	printf("NO\n");

	else

	printf("YES\n");

	return 0;

 } 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int N,a[200000],flag=1;

	scanf("%d",&N);

	for(int i=0;i<N;i++)

	scanf("%d",&a[i]);

	sort(a,a+N);

	for(int i=1;i<N;i++)

	{

		if(a[i]==a[i-1])

		{

			flag=0;

			break;

		}

	}

	if(flag==1)	printf("YES\n");

	else	printf("NO\n");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

map <int,int>frq;

int n;



int main()

{

    cin>>n;

    while (n--)

    {

        int u;

        cin>>u;

        frq[u]++;

    }

    bool dis = true;



    for (auto  it = frq.begin(); it != frq.end(); it++)

    {

        if ((*it).second>1)

        {

            dis = false;

        }

        

    }



    if (dis)

    {

        cout<<"YES"<<endl;

    }else

    {

        cout<<"NO"<<endl;

    }

    

    

    



    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int N,a[200000],flag=1;

	scanf("%d",&N);

	for(int i=0;i<N;i++)

	scanf("%d",&a[i]);

	sort(a,a+N);

	for(int i=1;i<N;i++)

	{

		if(a[i]==a[i-1])

		{

			flag=0;

			break;

		}

	}

	if(flag==1)	printf("YES\n");

	else	printf("NO\n");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



#define ll long long



using namespace std;



map<ll, bool>mp;



int main()

{

    bool f = false;

    int n;

    cin >> n;

    ll arr[n];

    cin >> arr[0];

    mp[ arr[0] ] = true;

    for(int i = 1; i < n; i++)

    {

        cin >> arr[i];

        if( mp[ arr[i] ] )

            f = true;

        mp [ arr[i] ] = true;

    }

    if( f )

        cout << "NO" << endl;

    else cout << "YES" << endl;



   return 0;



}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int N,a[200000],flag=1;

	scanf("%d",&N);

	for(int i=0;i<N;i++)

	scanf("%d",&a[i]);

	sort(a,a+N);

	for(int i=1;i<N;i++)

	{

		if(a[i]==a[i-1])

		{

			flag=0;

			break;

		}

	}

	if(flag==1)	printf("YES\n");

	else	printf("NO\n");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

using namespace std;

int main(){

	int n;

	int a[200000];

	cin>>n;

	for(int i=0;i<n;i++){

		cin>>a[i];

		

		

	}

	sort(a,a+n);

	for(int i=0;i<n;i++){

		if(a[i]==a[i-1]){

			cout<<"NO"<<endl;

			return 0;

		}

	}

	cout<<"YES"<<endl;

	

	

	return 0;

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

int main()

{

	int N,a[200000],flag=1;

	scanf("%d",&N);

	for(int i=0;i<N;i++)

	scanf("%d",&a[i]);

	sort(a,a+N);

	for(int i=1;i<N;i++)

	{

		if(a[i]==a[i-1])

		{

			flag=0;

			break;

		}

	}

	if(flag==1)	printf("YES\n");

	else	printf("NO\n");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <cmath>

#include <set>



int main()

{

	std::set<int> set;

	int n;

	scanf("%d", &n);

	for (int i = 0; i < n; ++i)

	{

		int a;

		scanf("%d", &a);

		if (set.count(a))

		{

			puts("NO");

			return 0;

		}

		set.insert(a);

	}

	puts("YES");

	return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



int main()

{

	int n;

	scanf("%d", &n);

	int a[200000];

	for (int i = 0; i < n; ++i)

    {

		scanf("%d", a + i);

    }

	std::sort(a, a + n);

	for (int i = 0; i < n - 1; ++i)

    {

		if (a[i] == a[i + 1])

        {

			puts("NO");

			return 0;

        }

    }

	puts("YES");

	return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



const int N = 1e5+7;

vector<int> adj[N];



int dfs(int u, int par)

{

    int gr = 0;

    for (auto v : adj[u])

        if (v!=par)

            gr ^= dfs(v, u);

    return 1 + gr;

}



int main()

{

  //  ios::sync_with_stdio(0);

  //  cin.tie(0);



    int t;

    t=1;



    while(t--) {

        fill(adj, adj+N, vector<int>());



        int n;

        cin>>n;



        for (int i=1; i<n; i++) {

            int u, v;

            cin>>u>>v;

            adj[u].push_back(v);

            adj[v].push_back(u);

        }

        int gr = dfs(1, -1) - 1;

        cout<<(gr ? "Alice\n" : "Bob\n");

    }

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

const int N=2e6+5;

struct node{

    int u,v,nxt;

}edge[N];

int head[N],mcnt;

void add_edge(int u,int v){

    mcnt++;

    edge[mcnt].u=u;

    edge[mcnt].v=v;

    edge[mcnt].nxt=head[u];

    head[u]=mcnt;

}

int g[N];

int SG(int u,int fa=0){

    g[u]=0;

    for(int i=head[u];i;i=edge[i].nxt){

        int v=edge[i].v;

        if(v==fa)

            continue ;

        g[u]^=SG(v,u)+1;

    }

    return g[u];

}

int n;

int main()

{

    scanf("%d",&n);

    for(int i=1;i<n;i++){

        int u,v;

        scanf("%d%d",&u,&v);

        add_edge(u,v);

        add_edge(v,u);

    }

    puts(SG(1)?"Alice":"Bob");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



const int N = 1e5+10;

int n, nim[N];

vector<int> g[N];



void dfs(int u, int f) {

	for(int v : g[u]) if(v != f)

		dfs(v,u);

	for(int v : g[u]) if(v != f) {

		nim[u] ^= (nim[v] + 1);

	}

}



int main() {

	scanf("%d", &n);

	for(int i = 1; i < n; i++) {

		int u, v;

		scanf("%d %d", &u, &v);

		g[u].push_back(v);

		g[v].push_back(u);

	}

	dfs(1,-1);

	if(nim[1] == 0) puts("Bob");

	else puts("Alice");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

const int N=2e6+5;

struct node{

    int u,v,nxt;

}edge[N];

int head[N],mcnt;

void add_edge(int u,int v){

    mcnt++;

    edge[mcnt].u=u;

    edge[mcnt].v=v;

    edge[mcnt].nxt=head[u];

    head[u]=mcnt;

}

int g[N];

int SG(int u,int fa=0){

    g[u]=0;

    for(int i=head[u];i;i=edge[i].nxt){

        int v=edge[i].v;

        if(v==fa)

            continue ;

        g[u]^=SG(v,u)+1;

    }

    return g[u];

}

int n;

int main()

{

    scanf("%d",&n);

    for(int i=1;i<n;i++){

        int u,v;

        scanf("%d%d",&u,&v);

        add_edge(u,v);

        add_edge(v,u);

    }

    puts(SG(1)?"Alice":"Bob");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define int long long

#define rint register int

using namespace std;



template<typename tp> inline void read(tp &x) {

  x = 0; char c = getchar(); int f = 0;

  for (; c < '0' || c > '9'; f |= c == '-', c = getchar());

  for (; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar());

  if (f) x = -x;

}

int n;

vector<int> g[233333];



inline int dfs(int u, int fat) {

  int now = 0;

  for (int v : g[u])

    if (v != fat)

      now ^= 1 + dfs(v, u);

  return now;

}



main(void) {

  read(n);

  for (int i = 2; i <= n; i ++) {

    int x, y; read(x); read(y);

    g[x].push_back(y); g[y].push_back(x);

  }

  puts( dfs(1, 0) ? "Alice" : "Bob" );

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

typedef long long ll;

const int N=2e6+5;

struct node{

    int u,v,nxt;

}edge[N];

int head[N],mcnt;

void add_edge(int u,int v){

    mcnt++;

    edge[mcnt].u=u;

    edge[mcnt].v=v;

    edge[mcnt].nxt=head[u];

    head[u]=mcnt;

}

int g[N];

int SG(int u,int fa=0){

    g[u]=0;

    for(int i=head[u];i;i=edge[i].nxt){

        int v=edge[i].v;

        if(v==fa)

            continue ;

        g[u]^=SG(v,u)+1;

    }

    return g[u];

}

int n;

int main()

{

    scanf("%d",&n);

    for(int i=1;i<n;i++){

        int u,v;

        scanf("%d%d",&u,&v);

        add_edge(u,v);

        add_edge(v,u);

    }

    puts(SG(1)?"Alice":"Bob");

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

int n;

std::vector<int> g[100005];

int dfs(int u,int fa){

	int sg=0;

	for(int v:g[u])if(v!=fa)sg^=dfs(v,u)+1;

	return sg;

}

int main(){

	scanf("%d",&n);

	for(int i=1,x,y;i<n;i++){

		scanf("%d%d",&x,&y);

		g[x].push_back(y),g[y].push_back(x);

	}

	puts(dfs(1,0)?"Alice":"Bob");

}


// Optimized solution to the same problem (faster):
#include <cstdio>



int read()

{

  int x=0,f=1;

  char ch=getchar();

  while((ch<'0')||(ch>'9'))

    {

      if(ch=='-')

        {

          f=-f;

        }

      ch=getchar();

    }

  while((ch>='0')&&(ch<='9'))

    {

      x=x*10+ch-'0';

      ch=getchar();

    }

  return x*f;

}



const int maxn=100000;



int n,pre[maxn*2+10],now[maxn+10],son[maxn*2+10],tot,f[maxn+10];



int ins(int a,int b)

{

  pre[++tot]=now[a];

  now[a]=tot;

  son[tot]=b;

  return 0;

}



int search(int u,int fa)

{

  for(int i=now[u]; i; i=pre[i])

    {

      int v=son[i];

      if(v==fa)

        {

          continue;

        }

      search(v,u);

      f[u]^=(f[v]+1);

    }

  return 0;

}



int main()

{

  n=read();

  for(int i=1; i<n; ++i)

    {

      int a=read(),b=read();

      ins(a,b);

      ins(b,a);

    }

  search(1,0);

  puts(f[1]?"Alice":"Bob");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

#define MAX 300000

vector<int>g[MAX];

int dfs(int u,int p){

    int l=0;

    for(int v:g[u]){

        if(v!=p){

         l^=1+dfs(v,u);   

        }

    }

    return l;

}

int main() {

	int n,u,v;

	cin>>n;

	for(int i=0;i<n-1;i++){

	    cin>>u>>v;

	    g[u].push_back(v);

	    g[v].push_back(u);

	}

	cout<<(dfs(1,0)?"Alice":"Bob");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

#include<cmath>

#include<vector>

#define SF scanf

#define PF printf

#define MAXN 200010

using namespace std;

int n;

struct node{

	int x;

	node *nxt;	

}edge[MAXN*2];

node *head[MAXN],*ncnt=edge;

void add_edge(int x,int y){

	ncnt++;

	ncnt->x=y;

	ncnt->nxt=head[x];

	head[x]=ncnt;

}

int sg[MAXN];

void dfs(int x,int fa){

	for(node *v=head[x];v!=NULL;v=v->nxt){

		int u=v->x;

		if(u==fa)

			continue;

		dfs(u,x);

		sg[x]^=(sg[u]+1);	

	}

}

int main(){

	SF("%d",&n);

	int u,v;

	for(int i=1;i<n;i++){

		SF("%d%d",&u,&v);

		add_edge(u,v);

		add_edge(v,u);

	}

	dfs(1,0);

	if(sg[1]==0)

		PF("Bob");

	else

		PF("Alice");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

const int maxn=200100;



vector<int>v[maxn];

int n;



int dfs(int x,int fa)

{

	int ans=0;

	for(int i=0;i<v[x].size();i++)

	{

		int y=v[x][i];

		if(y==fa)continue;

		ans^=(dfs(y,x)+1);

	}

	return ans;

}



int main()

{

	cin>>n;

	for(int i=1;i<n;i++)

	{

		int x,y;

		cin>>x>>y;

		v[x].push_back(y);

		v[y].push_back(x);

	}

	if(dfs(1,0))cout<<"Alice";

	else cout<<"Bob";

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>



using namespace std ;



#define N 200007



int tot , n ;

int nex[2*N] , fire[N] , to[2*N] , sg[N] ;



void add(int u , int v){

    nex[++tot] = fire[u] ;

    fire[u] = tot ;

    to[tot] = v ;

    return ;

}



void dfs(int x , int fr){

    for(int i = fire[x] ; i ; i = nex[i] ){

        int v = to[i] ;

        if( v == fr ) continue ;

        dfs( v , x ) ;

        sg[x] ^= ( sg[v] + 1 ) ;

    }

    return ;

}



int main()

{

    scanf("%d" , &n ) ;

    for(int i = 1 ; i <= n - 1 ; i++ ){

        int u , v ;

        scanf("%d%d" , &u , &v ) ;

        add( u , v ) ; add( v , u ) ;

    }

    dfs( 1 , 0 ) ;

    if( sg[1] ) printf("Alice\n") ;

    else printf("Bob\n") ;

    return 0 ;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// luogu-judger-enable-o2

//Code by : Y-k-y

#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <queue>

#include <vector>

#include <set>

#define ll long long

const int N=100010;

using namespace std;

inline int rnd(){

	int res=0,f=1;char ch=getchar();

	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}

	while(isdigit(ch)){res=res*10+ch-'0';ch=getchar();}

	return res*f;

}

inline void wr(int x){

	if(x<0){putchar('-');x=-x;}if(x>9) wr(x/10);putchar(x%10+'0');

}

vector<int>vec[N];

int n,sg[N];

inline void dfs(int u,int f){

	sg[u]=0;

	for(int i=0;i<vec[u].size();i++){

		int v=vec[u][i];

		if(v==f)continue;

		dfs(v,u);

		sg[u]^=(sg[v]+1);

	}

}

int main(){

	cin>>n;int x,y;

	for(int i=1;i<n;i++){

		x=rnd();y=rnd();

		vec[x].push_back(y);

		vec[y].push_back(x);

	}

	dfs(1,0);

	if(sg[1])puts("Alice");

	else puts("Bob");

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

const int N=400002;

int n,a,b,i,j,k;

int h[N],t[N],v[N],sg[N];

void add(int a,int b){

	t[++k]=h[a];

	h[a]=k;

	v[k]=b;

}

void init(){

	scanf("%d",&n);

	for(i=1;i<n;i++){

		scanf("%d%d",&a,&b);

		add(a,b);

		add(b,a);

	}

}

void dfs(int i,int fa){

	for(int j=h[i];j;j=t[j])

		if(v[j]!=fa){

			dfs(v[j],i);

			sg[i]^=sg[v[j]]+1;

		}

}

int main(){

	init();

	dfs(1,0);

	printf("%s",sg[1]?"Alice":"Bob");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdlib>

#include <cstdio>

#define N 200011

using namespace std;

struct apple{

	int v,nxt;

}edge[N*4];

int indexx[N],n,dp[N],tot;

void addedge(int x,int y){

	edge[++tot].v=y;

	edge[tot].nxt=indexx[x];

	indexx[x]=tot;

}

void dfs(int u,int fa){

	int t=indexx[u],vv;

	while(t){

		vv=edge[t].v;

		if(vv!=fa){

			dfs(vv,u);

			dp[u]^=(dp[vv]+1);

		}

		t=edge[t].nxt;

	}

}

int main(){

	int x,y;

	scanf("%d",&n);

	for(int i=1;i<n;i++){

		scanf("%d%d",&x,&y);

		addedge(x,y);

		addedge(y,x);

	}

	dfs(1,0);

	if(dp[1]) printf("Alice\n");

	else printf("Bob\n");

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstring>

#include <cmath>

#include <queue>

#include <algorithm>



#define N 200005



using namespace std;



int n;

int h[N], adj[N], nxt[N], o;



inline void add (int u, int v) {

	nxt[++o] = h[u];

	h[u] = o;

	adj[o] = v;

	return ;

}



int dfs (int u, int la) {

    int sum = 0;

    for (int i = h[u]; i; i = nxt[i]) {

    	int v = adj[i];

    	if (la != v)

    		sum ^= dfs (v, u) + 1; 

    }

    return sum;

}



int main () {

    scanf ("%d", &n);

    for (int i = 1, u, v; i < n; ++i) {

        scanf ("%d%d", &u, &v);

        add (u, v);

        add (v, u); 

    }

    if (dfs (1, 0))

    	puts ("Alice");

    else 

    	puts ("Bob");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef pair<int, int> ii; 



const int N = 2e5 + 10; 

vector<int> adj[N]; 



int dfs(int u, int par = -1) {

	int g = 0; 

	for(int v : adj[u]) if(v - par) 

		g ^= dfs(v, u) + 1; 

	return g; 

}

int main(int argc, char const *argv[]) {

	int n; cin >> n; 

	for(int i = 1; i < n; i++) {

		int u, v; 

		cin >> u >> v;

		adj[u].push_back(v);

		adj[v].push_back(u);

	}	

	puts(dfs(1) ? "Alice" : "Bob"); 

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

#define MAXN 100010

int Adj[MAXN],V[MAXN*2],nxt[MAXN*2],c,n;

void AddEdge(int u,int v)

{

	c++;V[c]=v,nxt[c]=Adj[u];Adj[u]=c;

}

int dfs(int u,int p)

{

	int ret=0;

	for(int i=Adj[u];i;i=nxt[i])

		if(V[i]!=p)

		{

			ret^=dfs(V[i],u)+1;

		}

	return ret;

}

int main()

{

	scanf("%d",&n);

	for(int i=1;i<n;i++)

	{

		int u,v;

		scanf("%d%d",&u,&v);

		AddEdge(u,v);

		AddEdge(v,u);

	}

	int ans=dfs(1,0);

	if(ans) printf("Alice\n");

	else printf("Bob\n");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<vector>

using namespace std;

const int MAXN=100005;



int N;

vector<int> adj[MAXN];

int sg[MAXN];



void dfs(int u,int fa=0)

{

	for(auto v:adj[u])

	{

		if(v==fa)

			continue;

		dfs(v,u);

		sg[u]^=(sg[v]+1);

	}

}



int main()

{

	scanf("%d",&N);

	for(int i=1;i<N;i++)

	{

		int x,y;

		scanf("%d%d",&x,&y);

		adj[x].push_back(y);

		adj[y].push_back(x);

	}

	dfs(1);

	if(sg[1])

		puts("Alice");

	else

		puts("Bob");

	

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

using namespace std;

#define MAXN 100010

int Adj[MAXN],V[MAXN*2],nxt[MAXN*2],c,n;

void AddEdge(int u,int v)

{

	c++;V[c]=v,nxt[c]=Adj[u];Adj[u]=c;

}

int dfs(int u,int p)

{

	int ret=0;

	for(int i=Adj[u];i;i=nxt[i])

		if(V[i]!=p)

		{

			ret^=dfs(V[i],u)+1;

		}

	return ret;

}

int main()

{

	scanf("%d",&n);

	for(int i=1;i<n;i++)

	{

		int u,v;

		scanf("%d%d",&u,&v);

		AddEdge(u,v);

		AddEdge(v,u);

	}

	int ans=dfs(1,0);

	if(ans) printf("Alice\n");

	else printf("Bob\n");

}

// Fastest known solution for this problem: