given n, print all the combinations of 0...(n-1) of length n example n = 2 00 01 10 11 n = 3 000 001 002 010 011 012 020 021 022 100 101 102 110 111 112 120 121 122 200 201 202 210 211 212 220 221 222