Nested for loop for n number

join shbcf.ru