This problem provides a rich context for visualisation and suggests many similar lines of enquiry.
For example :

Can all letters of the alphabet be represented using only a 5 by 5 array of cubes ?

Is it possible to create every combination of three letters in a 'perforated cube' ?

What difference does the orientation of the letters make ?

How many ways are there to orientate three nonsymmetric letters such as F, J and P ?

What difference will it make to use letters that have symmetry of some kind ?
For any chosen combination of letters and orientation, explore the variation possible in successful arrangements.
 Can every solution arrangement have either more cubes added or some removed, and still be a solution arrangement ?
 Is there a relationship between the maximum and minimum number of cubes for any solution ?
Exploring the perforated cube problem, and related questions, using cliptogether plastic cubes will provide invaluable 'concrete' sensory experience for students as they stretch their powers of visualisation, express the problem, test their conjectures, or represent their solutions.
The Freudenthal Institute for Science and Mathematics Education has some very useful Java interactivities.
Follow this link to access these environments : http://www.fisme.science.uu.nl/publicaties/subsets/rekenweb_en/
The best interactivity for this problem is called '
Building Houses ', but 'Building free ' and also 'Building Houses with Side Views ' are both excellent resources for problems of this kind. As always, Java can take a few seconds to load.
In 'Building free ' you need to type 5 into the size box if you want to match the context of this Perforated Cube problem.
The information above is repeated on the
Hint page which also contain this excellent
video of one solution for E, S and H 
video of an ESH solution