#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#define MAX_TASK_NAME_LENGTH 100

// Structure to represent a task node in the doubly linked list
typedef struct TaskNode {
    char taskName[MAX_TASK_NAME_LENGTH];
    struct TaskNode* prev;
    struct TaskNode* next;
} TaskNode;

// Function to create a new task node
TaskNode* createTaskNode(const char* taskName) {
    TaskNode* newNode = (TaskNode*)malloc(sizeof(TaskNode));
    if (newNode == NULL) {
        printf("Memory allocation failed\n");
        exit(EXIT_FAILURE);
    }
    strcpy(newNode->taskName, taskName);
    newNode->prev = NULL;
    newNode->next = NULL;
    return newNode;
}

// Function to insert a task node at the end of the doubly linked list
void insertTaskNode(TaskNode** head, TaskNode** tail, const char* taskName) {
    TaskNode* newNode = createTaskNode(taskName);
    if (*head==NULL)}