Language: C++

#include <list>
#include <cstdio>
int Q, a; char c[14]; list<int> l;
int main() {
	scanf("%d", &Q);
	for(int i = 0; i < Q; i++) {
		scanf("%s", c);
		switch(c[0] + c[6]) {
		case 105: scanf("%d", &a), l.push_front(a); break;
		case 170: l.pop_front(); break;
		case 176: l.pop_back(); break;
		default:
			scanf("%d", &a);
			for(list<int>::iterator it = l.begin(); it != l.end(); it++) {
				if(*it == a) {
					l.delete(it); break;
				}
			}
		}
	}
	for(list<int>::iterator it = l.begin(); it != l.end(); it++) printf("%d\n", *it);
}

Compiler output:
a.cc:3:23: error: 'list' does not name a type
    3 | int Q, a; char c[14]; list<int> l;
      |                       ^~~~
a.cc: In function 'int main()':
a.cc:9:44: error: 'l' was not declared in this scope
    9 |                 case 105: scanf("%d", &a), l.push_front(a); break;
      |                                            ^
a.cc:14:29: error: 'list' was not declared in this scope
   14 |                         for(list<int>::iterator it = l.begin(); it != l.end(); it++) {
      |                             ^~~~
a.cc:14:29: note: suggested alternatives:
In file included from /usr/include/c++/14/list:65,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_list.h:633:11: note:   'std::__cxx11::list'
  633 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
/usr/include/c++/14/list:87:13: note:   'std::pmr::list'
   87 |       using list = std::list<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~
a.cc:14:34: error: expected primary-expression before 'int'
   14 |                         for(list<int>::iterator it = l.begin(); it != l.end(); it++) {
      |                                  ^~~
a.cc:14:65: error: 'it' was not declared in this scope; did you mean 'i'?
   14 |                         for(list<int>::iterator it = l.begin(); it != l.end(); it++) {
      |                                                                 ^~
      |                                                                 i
a.cc:16:43: error: expected unqualified-id before 'delete'
   16 |                                         l.delete(it); break;
      |                                           ^~~~~~
a.cc:21:13: error: 'list' was not declared in this scope
   21 |         for(list<int>::iterator it = l.begin(); it != l.end(); it++) printf("%d\n", *it);
      |             ^~~~
a.cc:21:13: note: suggested alternatives:
/usr/include/c++/14/bits/stl_list.h:633:11: note:   'std::__cxx11::list'
  633 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
/usr/include/c++/14/list:87:13: note:   'std::pmr::list'
   87 |       using list = std::list<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~
a.cc:21:18: error: expected primary-expression before 'int'
   21 |         for(list<int>::iterator it = l.begin(); it != l.end(); it++) printf("%d\n", *it);
      |                  ^~~
a.cc:21:49: error: 'it' was not declared in this scope; did you mean 'int'?
   21 |         for(list<int>::iterator it = l.begin(); it != l.end(); it++) printf("%d\n", *it);
      |                                                 ^~
      |                                                 int
a.cc:21:55: error: 'l' was not declared in this scope
   21 |         for(list<int>::iterator it = l.begin(); it != l.end(); it++) printf("%d\n", *it);
      |                                                       ^