func_code_string: #include <bits/stdc++.h>   using namespace std;   bool test_cases;   void init(bool k) {     test_cases = k;     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);   }   struct test_cases {     void prepare_left(long long *great_left, long long n, long long *a) {       stack<long long> st;       great_left[0] = -1;       st.push(a[0]);       for (long long i = 1; i < n; i++) {         while (!st.empty() and st.top() < a[i]) {           st.pop();         }         if (st.empty()) {           great_left[i] = -1;         } else {           great_left[i] = st.top();         }         st.push(a[i]);       }     }     void prepare_right(long long *great_right, long long n, long long *a) {       stack<long long> st;       great_right[n - 1] = -1;       st.push(a[n - 1]);       for (long long i = n - 2; i >= 0; i--) {         while (!st.empty() and st.top() < a[i]) {           st.pop();         }         if (st.empty()) {           great_right[i] = -1;         } else {           great_right[i] = st.top();         }         st.push(a[i]);       }     }     void test_case(long long test) {       long long n;       cin >> n;       long long a[n];       long long great_left[n];       long long great_right[n];       for (long long i = 0; i < n; i++) cin >> a[i];       long long ans = 0;       for (long long i = 0; i < n - 1; i++) {         ans = max(ans, a[i] ^ a[i + 1]);       }       prepare_left(great_left, n, a);       prepare_right(great_right, n, a);       for (long long i = 0; i < n; i++) {         long long left = great_left[i];         long long right = great_right[i];         if (left != -1) {           ans = max(ans, left ^ a[i]);         }         if (right != -1) {           ans = max(ans, right ^ a[i]);         }         if (left != -1 and right != -1) {           ans = max(ans, left ^ right);         }       }       cout << ans <<   n ;     }   };   int32_t main() {     init(false);     long long tc;     if (test_cases) {       cin >> tc;     } else {       tc = 1;     }     for (long long i = 0; i < tc; i++) {       struct test_cases o;       o.test_case(i + 1);     }     return 0;   };   