rule all:
    input:
        'output/result.n3',
    output:
        'output/done.txt',
    shell:
        'echo all >> {output}'


rule n3:
    input:
        dynamic("output/{id2}.n2"),
    output:
        "output/result.n3",
    shell:
        'echo n3 > {output}'


rule n2:
    input:
        dyn=dynamic("output/{id1}.n1"),
    output:
        dynamic("output/{id2}.n2"),
    shell:
        'echo n2 > output/result.n2'


rule n1:
    output:
        dyn=dynamic("output/{id1}.n1"),
    shell:
        'echo n1 > output/result.n1'
