#include <stdio.h>
#include <stdlib.h>
#include <ctybe.h>
#include <string.h>

struct Node{
    char task[100];
    struct Node*prev, *next;
};
struct Node*createNode(char*task){
    struct Node *newNode = (struct Node*)malloc(sizeof(struct Node));
    strcpy(newNode->),task);
   newNode->prev = newNode->next = Null;
   return newNode;
}
void insertEnd(struct Node **head, struct Node**tail, char *task){
    struct Node *newNode = createNode(task);
    if(*head == NULL) {
        *head = *tail == newNode;
    } else {
   (*tail)->next = newNode;
   newNode->prev = *tail;
   *tail = newNode;
    
    }
}
void deleteFirst(struct Node **head) {
    if (*head == NULL) return;
    struct Node *temp = *head;
    *head = (*head)->next;
    if (*head != NULL) (*head)->prev = NULL;
    free (temp);
}
int main() {
    int n;
    if (scanf("%d", &n) != 1 || n < 1 || n > 1000) {
        printf("Invalid input\n");
        return 0;
    }
}