// editor1
#include<stdio.h>
#include<stdlib.h>
struct node{
    char data[100];
    struct node* next;
    struct node* prev;
};
struct node* head;
struct node* prev=NULL;
struct node* temp;
struct node* next=NULL;
void createlist(int data){
    struct node* newnode=(struct node*)malloc(sizeof(struct node));
    newnode->data=data;
    newnode->next=NULL;
    newnode->prev=NULL;
    return newnode;
}
void printlist(){
    temp=head;
    while(temp!=NULL){
        printf("%s",temp->data);
        temp=temp->data;
    }
}
void deleteatbeginning(struct node* head){
    temp=head;
    head=head->next;
    if(head!=NULL){
        head->prev=NULL;
    }
    free(temp);
    return head;
}
int main(){
    int n;
    scanf("%d",&n);
    char arr[n];
    for(int i=0;i<n;i++){
        if(scanf("%s",arr)!=1){
            printf("Invalid input");
            exit(1);
        }
    }
    
}