#include <bits/stdc++.h>
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
int Rand(int l, int r) { return std::uniform_int_distribution(l, r)(rng); }
int main() {
  std::vector<int> a;
  for (int i = 1; i <= 5; i++) {
    int c = Rand(1, 2) * 2;
    for (int j = 1; j <= c; j++) a.emplace_back(i);
  }
  std::shuffle(a.begin(), a.end(), rng);
  for (const auto x : a) std::cout << x << ' ';
  return 0;
}