#include<iostream>
#include<queue>
using namespace std;

int main() {
    int N;
    cin>> N;
    
    if (N < 0) {
        cout << "Invalid input";
        return 0;
    }
    queue<string> q;
    q.push("3");
    q.push("4");
    
    int ount = 0;
    while (count < N) {
        string cur =q.front();
        q.pop();
        
        cout << cur;
        count++;
         if (count < N)
         cout <<" ";
         
         q.push(cur + "3");
         q.push(cur + "4");
    }
    return 0;
}