#include <stdio.h>
#define C 1000
#include <stdio.h>
void g(int n, int flag) {
int m;
if (n >= 0) {
if (n < C) {
} else {
m = n % C;
g(n / C, 1);
}
if (flag)
else
}
}
void f(int n) { g(n, 0); }
int main() {
f(0);
f(1);
f(12);
f(123);
f(1234);
f(1201);
f(12001);
f(120001);
f(1200001);
f(12000001);
f(120000001);
return 0;
}
/* end */
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgQyAxMDAwCiNpbmNsdWRlIDxzdGRpby5oPgp2b2lkIGcoaW50IG4sIGludCBmbGFnKSB7CiAgaW50IG07CiAgaWYgKG4gPj0gMCkgewogICAgaWYgKG4gPCBDKSB7CiAgICAgIHByaW50ZigiJWQiLCBuKTsKICAgIH0gZWxzZSB7CiAgICAgIG0gPSBuICUgQzsKICAgICAgZyhuIC8gQywgMSk7CiAgICAgIHByaW50ZigiJTAzZCIsIG0pOwogICAgfQogICAgaWYgKGZsYWcpCiAgICAgIHByaW50ZigiLCIpOwogICAgZWxzZQogICAgICBwcmludGYoIlxuIik7CiAgfQp9CnZvaWQgZihpbnQgbikgeyBnKG4sIDApOyB9CmludCBtYWluKCkgewogIGYoMCk7CiAgZigxKTsKICBmKDEyKTsKICBmKDEyMyk7ICAKICBmKDEyMzQpOyAgCiAgZigxMjAxKTsgIAogIGYoMTIwMDEpOyAgCiAgZigxMjAwMDEpOyAgCiAgZigxMjAwMDAxKTsgIAogIGYoMTIwMDAwMDEpOyAgCiAgZigxMjAwMDAwMDEpOyAgCgogIHJldHVybiAwOwp9Ci8qIGVuZCAqLwo=
0
1
12
123
1,234
1,201
12,001
120,001
1,200,001
12,000,001
120,000,001