matrix generator (console application)