#include <bits/stdc++.h>

using namespace std;

struct node
{
  int data;
  struct node* left;
  struct node* right;
};

struct node* newNode(int idata)
{
  struct node* node = new struct node;
  node->data = idata;
  node->left = NULL;
  node->right = NULL;
  return node;
}

int main()
{
    struct node *root = newNode(1);
    int n, i,l,k;
    cin >> n;
    int a[n];
    for(i = 0; i < n-1; i++)
    {
        cin >> l >> k;
        root->left = newNode(l);
        root-> right = newNode(k);
    }
 srand((unsigned) time(0));
    int result = 1 + (rand() % 2);
    cout << result;
  return 0;
}