w1 <- function() (1:1000)[rbinom(1000, 1, 0.1)==1][1] replicate(10,w1())