Language: C

#include<stdio.h>
#include<stdlib.h>

struct node{
  int key;
  struct Node *prev, *next;
};

typedef struct node Node;

Node *nil;

void init(){
  nil = (Node *)malloc(sizeof(Node));
  nil->prev = nil;
  nil->next = nil;
}

void insert(int key){
  Node *x = (Node *)malloc(sizeof(Node));
  x->key = key;
  x->next = nil->next;
  nil->next->prev = x;
  nil->next = x;
  x->prev = nil;
}

Node* listSearch(int key){
  Node *cur = nil->next;
  while ( cur != nil && cur->key != key ){
    cur = cur->next;
  }
  return cur;
}

void deleteNode(Node *t){
  if (t == nil) return;
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}

void deleteFirst(){
  deleteNode(nil->next);
}

void deleteLast(){
  deleteNode(nil->prev);
}

void deleteKey(int key){
  deleteNode(listSearch(key));
}

int main(void){
  int n, i, a, b = 0;
  char s[100];
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(s[0] == 'd'){
      if(s[6] == 'F') deleteFirst();
      else if(s[6] == 'L') deleteLast();
      else {
        scanf("%d",&a);
        deleteKey(a);
      }
    }
    else {
      scanf("%d",&a);
      insert(a);
      b++;
    }
  }
  printf("%d",nil->next->key);
  Node *c = nil->next;
  for(i=0;i<b*2-n-1;i++){
    c = c->next;
    printf(" %d",c->key);
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c: In function 'init':
main.c:15:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   15 |   nil->prev = nil;
      |             ^
main.c:16:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   16 |   nil->next = nil;
      |             ^
main.c: In function 'insert':
main.c:23:12: error: invalid use of undefined type 'struct Node'
   23 |   nil->next->prev = x;
      |            ^~
main.c:24:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   24 |   nil->next = x;
      |             ^
main.c:25:11: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   25 |   x->prev = nil;
      |           ^
main.c: In function 'listSearch':
main.c:29:15: error: initialization of 'Node *' {aka 'struct node *'} from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
   29 |   Node *cur = nil->next;
      |               ^~~
main.c:31:9: error: assignment to 'Node *' {aka 'struct node *'} from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
   31 |     cur = cur->next;
      |         ^
main.c: In function 'deleteNode':
main.c:38:10: error: invalid use of undefined type 'struct Node'
   38 |   t->prev->next = t->next;
      |          ^~
main.c:39:10: error: invalid use of undefined type 'struct Node'
   39 |   t->next->prev = t->prev;
      |          ^~
main.c: In function 'deleteFirst':
main.c:44:17: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   44 |   deleteNode(nil->next);
      |              ~~~^~~~~~
      |                 |
      |                 struct Node *
main.c:36:23: note: expected 'Node *' {aka 'struct node *'} but argument is of type 'struct Node *'
   36 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'deleteLast':
main.c:48:17: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   48 |   deleteNode(nil->prev);
      |              ~~~^~~~~~
      |                 |
      |                 struct Node *
main.c:36:23: note: expected 'Node *' {aka 'struct node *'} but argument is of type 'struct Node *'
   36 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'main':
main.c:75:24: error: invalid use of undefined type 'struct Node'
   75 |   printf("%d",nil->next->key);
      |                        ^~
main.c:76:13: error: initialization of 'Node *' {aka 'struct node *'} from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
   76 |   Node *c = nil->next;
      |             ^~~
main.c:78:7: error: assignment to 'Node *' {aka 'struct node *'} from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types]
   78 |     c = c->next;
      |       ^