rule all:
    input: "step_10.txt"

rule step_1:
    output: "step_1.txt"
    shell: "echo 1 > {output}"

rule step_n:
    input: lambda wildcards: f"step_{int(wildcards.n) - 1}.txt"
    output: "step_{n}.txt"
    wildcard_constraints: n="[2-9]|10"
    shell: "echo {wildcards.n} > {output}"
