// editor3
#include<stdio.h>
#include<stdlib.h>
typedef struct node{
    int id;
    int p;
    struct node *next;
}nd;
nd *front=NULL,*tail;
void enqueue(int a,int b){
    nd *newnode=(nd*)malloc(sizeof(nd));
    newnode->id=a;
    newnode->p=b;
    newnode->next=NULL;
    if(front==NULL){
        front=tail=newnode;
    }
    else{
        rear->next=newnode;
        rear=newnode;
    }
}
int main(){
    int n;
    scanf("%d",&n);
    int x,y;
    scanf("%d %d",&x,&y);
    enqueue(x,y);
}