#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
#define maxn 500005
#define mi LLONG_MIN
#define ma LLONG_MAX
#define mod 1000000007
#define pb push_back
#define S second
#define F first
void solve() {
int n;
cin >> n;
if (n < 5) {
for (int i = 0; i < n * 12; i++) {
cout << i << " ";
}
} else {
for (int c = 0; c < n / 13; c++) {
for (int i = 0 + c * 13; i < 13 + c * 13; i++) {
for (int j = 0 + c * 13; j < 13 + c * 13; j++) {
if (i != j) cout << j << " ";
}
}
}
for (int i = n / 13 * 13; i < n / 13 * 13 + 12 * (n % 13); i++) {
cout << i << " ";
}
}
}
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t = 1;
// cin >> t;
while (t--) solve();
}