from random import randrange
def fy_iter(n):
deck = list(range(n))
for i in range(n):
k = randrange(i,n)
deck[i], deck[k] = deck[k], deck[i]
yield deck[i]
for x in fy_iter (20): print(x)
ZnJvbSByYW5kb20gaW1wb3J0IHJhbmRyYW5nZQoKZGVmIGZ5X2l0ZXIobik6CiBkZWNrID0gbGlzdChyYW5nZShuKSkKIGZvciBpIGluIHJhbmdlKG4pOgogIGsgPSByYW5kcmFuZ2UoaSxuKQogIGRlY2tbaV0sIGRlY2tba10gPSBkZWNrW2tdLCBkZWNrW2ldCiAgeWllbGQgZGVja1tpXQoKZm9yIHggaW4gZnlfaXRlciAoMjApOiBwcmludCh4KQo=