#include "stdio.h"
#include "stdlib.h"
//zad. 3

int *x,*y,*a;

void funk(int w,int q,int vr){
     if((q-w)==2) {a[w]=vr;a[w+1]=vr+1;a[q]=vr+2;}
     else {
          
     }     
}

int main(){FILE *in=fopen("flojd.in","r"),*out=fopen("flojd.out","w");

    int n,i;
    fscanf(in,"%d",&n);
    x=(int *)malloc(n*sizeof(int));
    y=(int *)malloc(n*sizeof(int));
    a=(int *)malloc(n*sizeof(int));
    for(i=0;i<n;i++) fscanf(in,"%d %d",x+i,y+i);
    funk(0,n-1,1);
    for(i=0;i<n;i++) fprintf(out,"%d\n",a[i]);

fclose(in);fclose(out);return 0;
}
