Just create 2 randomly generated rectangle cubes and dump their information out.
You know... Make an enum that defines numbers as letters (0-7, a-h), then you use the numbers as corners (which at the end will be shown as letters), and sides are 2 corners paired. You should make the generator not create squares, but it doesn't say anywhere that you cant define the rectangle yourself.