```
n = int (input())
for x in range (1, n + 1, 1):
    for y in range (1, 100, 1):
        z = 3 * y + 2
        if z % 4 != 0:
            print(z, end=' ')

```

This code can print the number which are not the multiples of 4, but how to make to stop after printing first 'n' numbers (z) which are not multiples of 4?

Input: `10`

Expected output: `5 11 14 17 23 26 29 35 38 41`

Actual Output: `5 11 14 17 23 26 29 35 38 41 47 50 53 59 62 65 71 74 77 83 86 89 95 98 101 107 110 113 119 122 125 131 134 137 143 146 149 155 158 161 167 170 173 179 182 185 191 194 197 203 206 209 215 218 221 227 230 233 239 242 245 251 254 257 263 266 269 275 278 281 287 290 293 299`