Language: C++

include<bits/stdc++.h>

using namespace std;

int main(){
    char s1[101],s2[100],s3[100];
    deque<char> a;
    deque<char> b;
    deque<char> c;
    scanf("%s",s1);
    for (int i=0;i<strlen(s1);i++) a.push_back(s1[i]);
    scanf("%s",s2);
    for (int i=0;i<strlen(s2);i++) b.push_back(s2[i]);
    scanf("%s",s3);
    for (int i=0;i<strlen(s3);i++) c.push_back(s3[i]);
    int f=0;
    for(;;) {
        if (f==0) {
            if (a.empty()) {
                printf("A\n");
                break;
            }
            f=a.front()-'a';
            a.pop_front();
        } else if (f==1) {
            if (b.empty()) {
                printf("B\n");
                break;
            }
            f=b.front()-'a';
            b.pop_front();
        } else {
            if (c.empty()) {
                printf("C\n");
                break;
            }
            f=c.front()-'a';
            c.pop_front();
        }
    }
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'deque' was not declared in this scope
    7 |     deque<char> a;
      |     ^~~~~
a.cc:7:11: error: expected primary-expression before 'char'
    7 |     deque<char> a;
      |           ^~~~
a.cc:8:11: error: expected primary-expression before 'char'
    8 |     deque<char> b;
      |           ^~~~
a.cc:9:11: error: expected primary-expression before 'char'
    9 |     deque<char> c;
      |           ^~~~
a.cc:10:5: error: 'scanf' was not declared in this scope
   10 |     scanf("%s",s1);
      |     ^~~~~
a.cc:11:20: error: 'strlen' was not declared in this scope
   11 |     for (int i=0;i<strlen(s1);i++) a.push_back(s1[i]);
      |                    ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | include<bits/stdc++.h>
a.cc:11:36: error: 'a' was not declared in this scope
   11 |     for (int i=0;i<strlen(s1);i++) a.push_back(s1[i]);
      |                                    ^
a.cc:13:20: error: 'strlen' was not declared in this scope
   13 |     for (int i=0;i<strlen(s2);i++) b.push_back(s2[i]);
      |                    ^~~~~~
a.cc:13:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:36: error: 'b' was not declared in this scope
   13 |     for (int i=0;i<strlen(s2);i++) b.push_back(s2[i]);
      |                                    ^
a.cc:15:20: error: 'strlen' was not declared in this scope
   15 |     for (int i=0;i<strlen(s3);i++) c.push_back(s3[i]);
      |                    ^~~~~~
a.cc:15:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:15:36: error: 'c' was not declared in this scope
   15 |     for (int i=0;i<strlen(s3);i++) c.push_back(s3[i]);
      |                                    ^
a.cc:19:17: error: 'a' was not declared in this scope
   19 |             if (a.empty()) {
      |                 ^
a.cc:20:17: error: 'printf' was not declared in this scope
   20 |                 printf("A\n");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<bits/stdc++.h>
a.cc:23:15: error: 'a' was not declared in this scope
   23 |             f=a.front()-'a';
      |               ^
a.cc:26:17: error: 'b' was not declared in this scope
   26 |             if (b.empty()) {
      |                 ^
a.cc:27:17: error: 'printf' was not declared in this scope
   27 |                 printf("B\n");
      |                 ^~~~~~
a.cc:27:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:30:15: error: 'b' was not declared in this scope
   30 |             f=b.front()-'a';
      |               ^
a.cc:33:17: error: 'c' was not declared in this scope
   33 |             if (c.empty()) {
      |                 ^
a.cc:34:17: error: 'printf' was not declared in this scope
   34 |                 printf("C\n");
      |                 ^~~~~~
a.cc:34:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:37:15: error: 'c' was not declared in this scope
   37 |             f=c.front()-'a';
      |               ^