Finish essential part of first assignment.
The programme creating the numbers is very fast. There might be some
gain in optimising I/O. Plotting the diagram, however takes ages. An
idea would be to remove duplicates prior to plotting (or even in the C++
part...)