greed string simulation