For no good reason other than curiosity I wrote a small and simple orbit simulation applet. I hesitate to even present it here since the interface is completely non-interactive. The math behind it is as simple as possible - it just sums the gravity acting on each body for each timeslice.
What you are seeing is Mars' larger moon Phobos in grey in the center of your screen. A smaller moon in blue orbits it. In reality neither Phobos, nor any other moon in our solar system, has any moon orbiting it. In spite of that I was curious of a moon of a moon in this case would be stable. It's within the hill sphere, and it is is stable.
The jar file may also be run as a Java application:
java -jar orbitsym-0.9.1.jar xml/planets.xml
Here it is: