func_code_string: #include <bits/stdc++.h>   using namespace std;   long long N, A[100];   int main(void) {     cin >> N;     for (long long i = ((long long)0); i < ((long long)N); i++) cin >> A[i];     bool ans = true;     long long p1 = 1, p2 = 2, s = 3;     for (long long i = ((long long)0); i < ((long long)N); i++) {       if (A[i] == p1) {         swap(p2, s);       } else if (A[i] == p2) {         swap(p1, s);       } else {         ans = false;         break;       }     }     cout << (ans ?  YES  :  NO ) << endl;   }   