int riseEqFall(int num) {
    int rdigit = num % 10;
    int netHeight = 0;
    while (num /= 10) {
        netHeight += ((num % 10) > rdigit) - ((num % 10) < rdigit);
        rdigit = num % 10;
    }
    return netHeight == 0;
}


int nextNum() {
    static int num = 0;
    do {num++;} while (!riseEqFall(num));
    return num;
}

int main(void) {
    int total, num;

    
    printf();
    for (total = 0; total < 200; total++)
        printf(, nextNum());

    
    printf();
    for (; total < 10000000; total++) num = nextNum();
    printf(, num);

    return 0;
}