#include <cstring>
#include <iostream>
void print(const char* str, unsigned width)
{
const char* line = str;
const char* end = line + std::strlen(line);
const char* letter = line;
while ( line < end )
{
while ((letter - line) < width && letter != end)
std::cout << *letter++;
std::cout << '\n';
line += width;
}
}
int main()
{
const char* s = "Supercalifragilisticexpialidocious";
print(s, 2);
}
I2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCnZvaWQgcHJpbnQoY29uc3QgY2hhciogc3RyLCB1bnNpZ25lZCB3aWR0aCkKewogICAgY29uc3QgY2hhciogbGluZSA9IHN0cjsKICAgIGNvbnN0IGNoYXIqIGVuZCA9IGxpbmUgKyBzdGQ6OnN0cmxlbihsaW5lKTsKICAgIGNvbnN0IGNoYXIqIGxldHRlciA9IGxpbmU7CgogICAgd2hpbGUgKCBsaW5lIDwgZW5kICkKICAgIHsKICAgICAgICB3aGlsZSAoKGxldHRlciAtIGxpbmUpIDwgd2lkdGggJiYgbGV0dGVyICE9IGVuZCkKICAgICAgICAgICAgc3RkOjpjb3V0IDw8ICpsZXR0ZXIrKzsKCiAgICAgICAgc3RkOjpjb3V0IDw8ICdcbic7CiAgICAgICAgbGluZSArPSB3aWR0aDsKICAgIH0KfQoKaW50IG1haW4oKQp7CiAgICBjb25zdCBjaGFyKiBzID0gIlN1cGVyY2FsaWZyYWdpbGlzdGljZXhwaWFsaWRvY2lvdXMiOwoKICAgIHByaW50KHMsIDIpOwp9