I probably made a typo in my previous comment: this should be `all(d == 'n' for d in dist)`