1.In a small saucepan bring water to a gentle simmer. Gradually stir in semolina; add sugar, rosewater and mastic. Cook, stirring, over low heat, about 5 minutes or until thickened. Transfer custard to small heatproof bowl; cover surface of custard with plastic wrap. Cool 1 hour.
2.Cut each pastry sheet in half, then cut each half into three rectangles. Roll one rectangle on floured surface until 12cm square. Place 1 level tbsp custard in centre of pastry; brush edges with egg. Fold two opposite edges of pastry over filling to enclose; brush the other two opposite edges with egg and fold to almost meet in the centre. Repeat with remaining pastry and custard.
3.In a large saucepan or wok, heat oil and deep-fry pastries, in batches, until browned lightly and crisp. Drain on absorbent paper.
4.Serve immediately, dusted with sifted icing sugar.
Mastic is available from shops that stock Greek and Middle Eastern food.Note