Language: C++

#include <math.h>
#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    cin >> s;
    int q;
    cin >> q;
    vector<char> vec(q);
    vector<char> vec2(q);
    vector<char> vec3(q);
    int p = 0;
    for(int i = 0; i < q; i++){
        cin >> vec.at(i);
        if(vec.at(i) == '2'){
            cin >> vec2.at(p);
            cin >> vec3.at(p);
            p++;
        }
    }
    queue<char> que;
    stack<char> sta;
    que.push(s);
    int p2 = 0;
    char tmp;
    for(int i = 0; i < q; i++){
        if(vec.at(i) == '1'){
            for(int i = 0; i < que.size(); i++){
                sta.push(que.front());
                que.pop();
            }
            for(int i = 0; i < sta.size(); i++){
                que.push(sta.top())
                sta.pop();
            }
        } else if(vec.at(i) == '2' && vec2.at(p2) == '1'){
            push(vec3.at(p2))
            for(int i = 0; i < que.size()-1; i++){
                sta.push(que.front());
                que.pop();
                que.push(sta.front());
                sta.pop();
            }
            p++;
        } else {
            que.push(vec3.at(p2));
            p++;
        }
    }
    while (!que.empty()) {
    cout << que.front();
    que.pop();
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: no matching function for call to 'std::queue<char>::push(std::string&)'
   24 |     que.push(s);
      |     ~~~~~~~~^~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]'
  283 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:283:30: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::queue<char>::value_type&' {aka 'const char&'}
  283 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]'
  288 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:288:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::queue<char>::value_type&&' {aka 'char&&'}
  288 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
a.cc:34:36: error: expected ';' before 'sta'
   34 |                 que.push(sta.top())
      |                                    ^
      |                                    ;
   35 |                 sta.pop();
      |                 ~~~                 
a.cc:38:13: error: 'push' was not declared in this scope
   38 |             push(vec3.at(p2))
      |             ^~~~
a.cc:39:49: error: expected ';' before ')' token
   39 |             for(int i = 0; i < que.size()-1; i++){
      |                                                 ^
      |                                                 ;