import std.stdio, std.string;

void main() {
    auto t = chomp(readln), s = "0".dup;
    while(s.length < t.length || s <= t) {
        writeln(s);
        
        if(s[0] < '9') {
            s[0]++;
        } else {
            s = "10" ~ s[1 .. $];
        }
    }
}