extern const char *const in; class S { public: char res[33]; S() { for (int i = 0; i < 32; i++) { const char *line = in + i * 8; res[i] = line[line[1] == line[2] ? 2 : 4]; } res[32] = 0; } }; S s; constexpr const char *f(const char *in) { return s.res; }