cubeword.cpp: In function 'void solve()':
cubeword.cpp:46:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | for (j = 0; j < s.size(); j++)
| ~~^~~~~~~~~~
cubeword.cpp:54:33: warning: array subscript has type 'char' [-Wchar-subscripts]
54 | a[s.size()][s[0]][s.back()]++;
| ^
cubeword.cpp:54:41: warning: array subscript has type 'char' [-Wchar-subscripts]
54 | a[s.size()][s[0]][s.back()]++;
| ~~~~~~^~
cubeword.cpp:60:33: warning: array subscript has type 'char' [-Wchar-subscripts]
60 | a[s.size()][s[0]][s.back()]++;
| ^
cubeword.cpp:60:41: warning: array subscript has type 'char' [-Wchar-subscripts]
60 | a[s.size()][s[0]][s.back()]++;
| ~~~~~~^~
cubeword.cpp:64:33: warning: array subscript has type 'char' [-Wchar-subscripts]
64 | a[s.size()][s[0]][s.back()]++;
| ^
cubeword.cpp:64:41: warning: array subscript has type 'char' [-Wchar-subscripts]
64 | a[s.size()][s[0]][s.back()]++;
| ~~~~~~^~
cubeword.cpp:80:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
80 | for (j = 0; j < per.size(); j++)
| ~~^~~~~~~~~~~~
cubeword.cpp:82:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | for (int h = j; h < per.size(); h++)
| ~~^~~~~~~~~~~~
cubeword.cpp:84:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | for (int hh = h; hh < per.size(); hh++)
| ~~~^~~~~~~~~~~~
cubeword.cpp:87:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
87 | for (i = 0; i < per.size(); i++)
| ~~^~~~~~~~~~~~
cubeword.cpp:89:48: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:89:56: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:89:72: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:89:80: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:89:103: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:89:112: warning: array subscript has type 'char' [-Wchar-subscripts]
89 | ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
| ^
cubeword.cpp:94:32: warning: array subscript has type 'char' [-Wchar-subscripts]
94 | chgl[per[j]][per[h]][per[hh]] += obshi;
| ^
cubeword.cpp:94:40: warning: array subscript has type 'char' [-Wchar-subscripts]
94 | chgl[per[j]][per[h]][per[hh]] += obshi;
| ^
cubeword.cpp:94:49: warning: array subscript has type 'char' [-Wchar-subscripts]
94 | chgl[per[j]][per[h]][per[hh]] += obshi;
| ^
cubeword.cpp:95:36: warning: array subscript has type 'char' [-Wchar-subscripts]
95 | if (chgl[per[j]][per[h]][per[hh]] >= mod)
| ^
cubeword.cpp:95:44: warning: array subscript has type 'char' [-Wchar-subscripts]
95 | if (chgl[per[j]][per[h]][per[hh]] >= mod)
| ^
cubeword.cpp:95:53: warning: array subscript has type 'char' [-Wchar-subscripts]
95 | if (chgl[per[j]][per[h]][per[hh]] >= mod)
| ^
cubeword.cpp:96:36: warning: array subscript has type 'char' [-Wchar-subscripts]
96 | chgl[per[j]][per[h]][per[hh]] %= mod;
| ^
cubeword.cpp:96:44: warning: array subscript has type 'char' [-Wchar-subscripts]
96 | chgl[per[j]][per[h]][per[hh]] %= mod;
| ^
cubeword.cpp:96:53: warning: array subscript has type 'char' [-Wchar-subscripts]
96 | chgl[per[j]][per[h]][per[hh]] %= mod;
| ^
cubeword.cpp:100:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
100 | for (j = 0; j < per.size(); j++)
| ~~^~~~~~~~~~~~
cubeword.cpp:102:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
102 | for (int h = j; h < per.size(); h++)
| ~~^~~~~~~~~~~~
cubeword.cpp:104:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
104 | for (int hh = h; hh < per.size(); hh++)
| ~~~^~~~~~~~~~~~
cubeword.cpp:106:44: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
106 | for (int glx = hh; glx < per.size(); glx++)
| ~~~~^~~~~~~~~~~~
cubeword.cpp:114:65: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:73: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:82: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:97: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:105: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:115: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:137: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:146: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:156: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:178: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:187: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:114:197: warning: array subscript has type 'char' [-Wchar-subscripts]
114 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
| ^
cubeword.cpp:118:65: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:73: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:82: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:97: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:105: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:115: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:137: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:146: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:156: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:178: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:187: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:118:197: warning: array subscript has type 'char' [-Wchar-subscripts]
118 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
| ^
cubeword.cpp:125:65: warning: array subscript has type 'char' [-Wchar-subscripts]
125 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 6) % mod;
| ^
cubeword.cpp:125:73: warning: array subscript has type 'char' [-Wchar-subscripts]
125 | anss = (anss + ((chgl[per[j]][per[h]][per[hh]] *