func_code_string: #include <bits/stdc++.h>   using namespace std;   string s;   map<string, bool> vis;   void ReadCube(string cube) {     int _4D[4][6] = {{0, 1, 2, 3, 4, 5},                      {0, 3, 2, 1, 5, 4},                      {0, 5, 2, 4, 1, 3},                      {0, 4, 2, 5, 3, 1}};     for (int i = 0; i < 4; ++i) {       string x(6,    );       for (int j = 0; j < 6; ++j) {         x[j] = cube[_4D[i][j]];       }       vis[x] = true;     }   }   void rotate90() {     swap(s[0], s[1]);     swap(s[1], s[2]);     swap(s[2], s[3]);     ReadCube(s);   }   void Left(string c) {     int p[] = {5, 1, 4, 3, 0, 2};     string x(6,    );     for (int i = 0; i < 6; ++i) {       x[i] = c[p[i]];     }     ReadCube(x);   }   void Right(string c) {     int p[] = {4, 1, 5, 3, 2, 0};     string x(6,    );     for (int i = 0; i < 6; ++i) {       x[i] = c[p[i]];     }     ReadCube(x);   }   int main() {     cin >> s;     int ans = 0;     sort(s.begin(), s.end());     do {       if (vis[s]) continue;       for (int i = 0; i < 4; ++i) {         rotate90();       }       Left(s);       Right(s);       ans++;     } while (next_permutation(s.begin(), s.end()));     cout << ans;     return 0;   }   