// editor2
#include <stdlib.h>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
struct node
{
    char s1[100];
    struct node* next;
    struct node* prev;
}*head=NULL,*tail;
int main()
{
    int n,i;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        struct node* newnode=(struct node*)malloc(sizeof(struct node));
        if(head==NULL)
        {
            head=newnode;
            tail=newnode;
            head->next=NULL;
            head->prev=NULL;
        }
        else
        {
            head->next=newnode;
            newnode->prev=head;
            newnode->next=NULL;
            tail=newnode;
        }
    }
    int p;
    scanf("%d",&p);
    struct node* x;
    for(i=0;i<p;i++)
    {
       x=x->next; 
    }
    x->prev->next=x->
    for(i=0;i<n-1;i++)
    {
        printf("%s ",head->s1);
        head=head->next;
    }
}