Digit training set generator.