func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int tmp = 3;     int x = 1, y = 2;     int n;     cin >> n;     bool flag = true;     for (int i = 1; i <= n; i++) {       int q;       cin >> q;       if (q == tmp) {         flag = false;       }       if (q == x)         swap(tmp, y);       else         swap(tmp, x);     }     if (flag)       cout <<  YES  << endl;     else       cout <<  NO  << endl;     return 0;   }   