func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MN = 2011;   int n, a[MN];   vector<int> ls[MN];   void solve1(int u) {     cout <<  YES  << endl;     for (int turn = 0, _a = (3); turn < _a; turn++) {       for (int i = (1), _b = (2000); i <= _b; i++) {         if (i != u) {           for (int x = 0, _a = (ls[i].size()); x < _a; x++)             cout << ls[i][x] <<    ;         } else {           if (turn == 0)             cout << ls[i][0] <<     << ls[i][1] <<     << ls[i][2] <<    ;           else if (turn == 1)             cout << ls[i][0] <<     << ls[i][2] <<     << ls[i][1] <<    ;           else             cout << ls[i][1] <<     << ls[i][0] <<     << ls[i][2] <<    ;           for (int x = (3), _b = (ls[i].size() - 1); x <= _b; x++)             cout << ls[i][x] <<    ;         }       }       cout << endl;     }   }   void solve2(int u, int v) {     cout <<  YES  << endl;     for (int turn = 0, _a = (3); turn < _a; turn++) {       for (int i = (1), _b = (2000); i <= _b; i++) {         if (i != u && i != v) {           for (int x = 0, _a = (ls[i].size()); x < _a; x++)             cout << ls[i][x] <<    ;         } else if (i == u) {           if (turn == 0)             cout << ls[i][0] <<     << ls[i][1] <<    ;           else if (turn == 1)             cout << ls[i][0] <<     << ls[i][1] <<    ;           else             cout << ls[i][1] <<     << ls[i][0] <<    ;           for (int x = (2), _b = (ls[i].size() - 1); x <= _b; x++)             cout << ls[i][x] <<    ;         } else if (i == v) {           if (turn == 0)             cout << ls[i][0] <<     << ls[i][1] <<    ;           else if (turn == 1)             cout << ls[i][1] <<     << ls[i][0] <<    ;           else             cout << ls[i][1] <<     << ls[i][0] <<    ;           for (int x = (2), _b = (ls[i].size() - 1); x <= _b; x++)             cout << ls[i][x] <<    ;         }       }       cout << endl;     }   }   int main() {     ios ::sync_with_stdio(false);     while (cin >> n) {       for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];       for (int i = (0), _b = (2000); i <= _b; i++) ls[i].clear();       for (int i = (1), _b = (n); i <= _b; i++) {         ls[a[i]].push_back(i);       }       bool ok = false;       for (int i = (0), _b = (2000); i <= _b; i++)         if (ls[i].size() >= 3) {           solve1(i);           ok = true;           break;         }       if (ok) continue;       for (int i = (1), _b = (2000); i <= _b; i++) {         for (int j = (i + 1), _b = (2000); j <= _b; j++)           if (ls[i].size() >= 2 && ls[j].size() >= 2) {             solve2(i, j);             ok = true;             break;           }         if (ok) break;       }       if (!ok) cout <<  NO  << endl;     }     return 0;   }   