# coupons.py 
# Fig. 40.2 
# input 6 or 10

import random, math

def collect(n):
  nTries = 0
  collected = set()
  while len(collected) < n:
    coupon = random.randint(1, n)  
    # choose a coupon, randomly 1/n
    nTries += 1
    collected.add(coupon)
  return nTries

if __name__ == "__main__":
  n = int(input("n=? "))
  tot = 0
  for i in range(10):
    spins = collect(n)
    print(spins, end = ' ')
    tot += spins
  print()
  print("Avg:", tot/10)
 