 He conceals himself and his donkey and realizes that the men are a band of thieves.With the magic words "open sesame", the head of the gang gets the cave to open and his men take their booty to hide.Once the thieves have left, Ali-Baba says the same words and enters the cave.