#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct String {
int* symbols;
int size;
int cap;
};
void add_symbol(struct String* s, int symbol) {
if (s->cap <= s->size) {
s->cap = (1+s->cap)*2;
s
->symbols
= realloc(s
->symbols
, s
->cap
*sizeof(int)); }
s->symbols[s->size++] = symbol;
}
int next_or_die(unsigned char** p) {
if (((**p) >> 6) != 0x2) {
}
return (*((*p)++)) & 0x3f;
}
struct String readline() {
struct String r;
char buf[100000];
unsigned char* p = (unsigned char*)&buf[0];
fgets(buf
, sizeof(buf
), stdin
); while (*p) {
if ((*p & 0x80) == 0) {
add_symbol(&r, *p++);
} else if (((*p) >> 5) == 0x6) {
int symbol = 0;
symbol = ((*p++) & 0x1f) << 6;
symbol |= next_or_die(&p);
add_symbol(&r, symbol);
} else if (((*p) >> 4) == 0xe) {
int symbol = 0;
symbol = ((*p++) & 0xf) << 12;
symbol |= next_or_die(&p) << 6;
symbol |= next_or_die(&p);
add_symbol(&r, symbol);
} else if (((*p) >> 3) == 0x1e) {
int symbol = 0;
symbol = ((*p++) & 0x7) << 18;
symbol |= next_or_die(&p) << 12;
symbol |= next_or_die(&p) << 6;
symbol |= next_or_die(&p);
add_symbol(&r, symbol);
}
}
return r;
};
void printline(struct String s) {
int i;
for (i = 0; i < s.size; i++) {
if (s.symbols[i] <= 0x7f) {
} else if (s.symbols[i] <= 0x7ff) {
putchar((s.
symbols[i
] >> 6) | 0xc0); putchar((s.
symbols[i
] & 0x3f) | 0x80); } else if (s.symbols[i] <= 0xffff) {
putchar((s.
symbols[i
] >> 12) | 0xe0); putchar(((s.
symbols[i
] >> 6)&0x3f)| 0x80); putchar((s.
symbols[i
]&0x3f) | 0x80); } else {
putchar((s.
symbols[i
] >> 18) | 0xf0); putchar(((s.
symbols[i
] >> 12)&0x3f)| 0x80); putchar(((s.
symbols[i
] >> 6)&0x3f) | 0x80); putchar((s.
symbols[i
]&0x3f) | 0x80); }
}
}
int min(int a, int b) {
return a<b?a:b;
}
struct String substring(struct String s, int from, int len) {
struct String r = {
s.symbols+min(s.size, from),
min(s.size, from+len)-min(s.size, from)
};
return r;
}
int main() {
struct String r = readline();
printline(r);
printline(substring(r, 11, 11));
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKc3RydWN0IFN0cmluZyB7CiAgICBpbnQqIHN5bWJvbHM7CiAgICBpbnQgc2l6ZTsKICAgIGludCBjYXA7Cn07Cgp2b2lkIGFkZF9zeW1ib2woc3RydWN0IFN0cmluZyogcywgaW50IHN5bWJvbCkgewogICAgaWYgKHMtPmNhcCA8PSBzLT5zaXplKSB7CiAgICAgICAgcy0+Y2FwID0gKDErcy0+Y2FwKSoyOwogICAgICAgIHMtPnN5bWJvbHMgPSByZWFsbG9jKHMtPnN5bWJvbHMsIHMtPmNhcCpzaXplb2YoaW50KSk7CiAgICB9CiAgICBzLT5zeW1ib2xzW3MtPnNpemUrK10gPSBzeW1ib2w7Cn0KCmludCBuZXh0X29yX2RpZSh1bnNpZ25lZCBjaGFyKiogcCkgewogICAgaWYgKCgoKipwKSA+PiA2KSAhPSAweDIpIHsKICAgICAgICBwcmludGYoIlVQU1xuIik7IGV4aXQoLTEpOwogICAgfQogICAgcmV0dXJuICgqKCgqcCkrKykpICYgMHgzZjsKfQoKc3RydWN0IFN0cmluZyByZWFkbGluZSgpIHsKICAgIHN0cnVjdCBTdHJpbmcgcjsKICAgIGNoYXIgYnVmWzEwMDAwMF07CiAgICB1bnNpZ25lZCBjaGFyKiBwID0gKHVuc2lnbmVkIGNoYXIqKSZidWZbMF07CiAgICBtZW1zZXQoJnIsIDAsIHNpemVvZihyKSk7CiAgICBmZ2V0cyhidWYsIHNpemVvZihidWYpLCBzdGRpbik7CiAgICB3aGlsZSAoKnApIHsKICAgICAgICBpZiAoKCpwICYgMHg4MCkgPT0gMCkgewogICAgICAgICAgICBhZGRfc3ltYm9sKCZyLCAqcCsrKTsKICAgICAgICB9IGVsc2UgaWYgKCgoKnApID4+IDUpID09IDB4NikgewogICAgICAgICAgICBpbnQgc3ltYm9sID0gMDsKICAgICAgICAgICAgc3ltYm9sICA9ICgoKnArKykgJiAweDFmKSA8PCA2OwogICAgICAgICAgICBzeW1ib2wgfD0gbmV4dF9vcl9kaWUoJnApOwogICAgICAgICAgICBhZGRfc3ltYm9sKCZyLCBzeW1ib2wpOwogICAgICAgIH0gZWxzZSBpZiAoKCgqcCkgPj4gNCkgPT0gMHhlKSB7CiAgICAgICAgICAgIGludCBzeW1ib2wgPSAwOwogICAgICAgICAgICBzeW1ib2wgID0gKCgqcCsrKSAmIDB4ZikgIDw8IDEyOwogICAgICAgICAgICBzeW1ib2wgfD0gbmV4dF9vcl9kaWUoJnApIDw8IDY7CiAgICAgICAgICAgIHN5bWJvbCB8PSBuZXh0X29yX2RpZSgmcCk7CiAgICAgICAgICAgIGFkZF9zeW1ib2woJnIsIHN5bWJvbCk7CiAgICAgICAgfSBlbHNlIGlmICgoKCpwKSA+PiAzKSA9PSAweDFlKSB7CiAgICAgICAgICAgIGludCBzeW1ib2wgPSAwOwogICAgICAgICAgICBzeW1ib2wgID0gKCgqcCsrKSAmIDB4NykgIDw8IDE4OwogICAgICAgICAgICBzeW1ib2wgfD0gbmV4dF9vcl9kaWUoJnApIDw8IDEyOwogICAgICAgICAgICBzeW1ib2wgfD0gbmV4dF9vcl9kaWUoJnApIDw8IDY7CiAgICAgICAgICAgIHN5bWJvbCB8PSBuZXh0X29yX2RpZSgmcCk7CiAgICAgICAgICAgIGFkZF9zeW1ib2woJnIsIHN5bWJvbCk7CiAgICAgICAgfQogICAgfQoKICAgIHJldHVybiByOwp9OwoKdm9pZCBwcmludGxpbmUoc3RydWN0IFN0cmluZyBzKSB7CiAgICBpbnQgaTsKICAgIGZvciAoaSA9IDA7IGkgPCBzLnNpemU7IGkrKykgewogICAgICAgIGlmIChzLnN5bWJvbHNbaV0gPD0gMHg3ZikgewogICAgICAgICAgICBwdXRjaGFyKHMuc3ltYm9sc1tpXSk7CiAgICAgICAgfSBlbHNlIGlmIChzLnN5bWJvbHNbaV0gPD0gMHg3ZmYpIHsKICAgICAgICAgICAgcHV0Y2hhcigocy5zeW1ib2xzW2ldID4+IDYpICAgfCAweGMwKTsKICAgICAgICAgICAgcHV0Y2hhcigocy5zeW1ib2xzW2ldICYgMHgzZikgfCAweDgwKTsKICAgICAgICB9IGVsc2UgaWYgKHMuc3ltYm9sc1tpXSA8PSAweGZmZmYpIHsKICAgICAgICAgICAgcHV0Y2hhcigocy5zeW1ib2xzW2ldID4+IDEyKSAgfCAweGUwKTsKICAgICAgICAgICAgcHV0Y2hhcigoKHMuc3ltYm9sc1tpXSA+PiA2KSYweDNmKXwgMHg4MCk7CiAgICAgICAgICAgIHB1dGNoYXIoKHMuc3ltYm9sc1tpXSYweDNmKSAgfCAweDgwKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBwdXRjaGFyKChzLnN5bWJvbHNbaV0gPj4gMTgpICB8IDB4ZjApOwogICAgICAgICAgICBwdXRjaGFyKCgocy5zeW1ib2xzW2ldID4+IDEyKSYweDNmKXwgMHg4MCk7CiAgICAgICAgICAgIHB1dGNoYXIoKChzLnN5bWJvbHNbaV0gPj4gNikmMHgzZikgfCAweDgwKTsKICAgICAgICAgICAgcHV0Y2hhcigocy5zeW1ib2xzW2ldJjB4M2YpICB8IDB4ODApOwogICAgICAgIH0KICAgIH0KICAgIHB1dGNoYXIoJ1xuJyk7Cn0KCmludCBtaW4oaW50IGEsIGludCBiKSB7CiAgICByZXR1cm4gYTxiP2E6YjsKfQoKc3RydWN0IFN0cmluZyBzdWJzdHJpbmcoc3RydWN0IFN0cmluZyBzLCBpbnQgZnJvbSwgaW50IGxlbikgewogICAgc3RydWN0IFN0cmluZyByID0gewogICAgICAgIHMuc3ltYm9scyttaW4ocy5zaXplLCBmcm9tKSwKICAgICAgICBtaW4ocy5zaXplLCBmcm9tK2xlbiktbWluKHMuc2l6ZSwgZnJvbSkKICAgIH07CiAgICByZXR1cm4gcjsKfQoKaW50IG1haW4oKSB7CiAgICBzdHJ1Y3QgU3RyaW5nIHIgPSByZWFkbGluZSgpOwogICAgcHJpbnRmKCJsZW49JWRcbiIsIHIuc2l6ZSk7CiAgICBwcmludGxpbmUocik7CiAgICBwcmludGxpbmUoc3Vic3RyaW5nKHIsIDExLCAxMSkpOwogICAgZnJlZShyLnN5bWJvbHMpOwogICAgcmV0dXJuIDA7Cn0K