def PRGA(S):
 i = 0
 j = 0
 while True:
  i = ((i + 1) % 256)
  j = ((j + S[i]) % 256)
  (S[i], S[j]) = (S[j], S[i])
  K = S[((S[i] + S[j]) % 256)]
  (yield K)

def PRGA ( S ) : i = 0 j = 0 while True : i = ( ( i + 1 ) % 256 ) j = ( ( j + S [ i ] ) % 256 ) ( S [ i ] , S [ j ] ) = ( S [ j ] , S [ i ] ) K = S [ ( ( S [ i ] + S [ j ] ) % 256 ) ] ( yield K )
run pseudo-random generation algorithm .