#include #include using namespace std; using namespace atcoder; using ll = long long; using db = long double; using ch = char; using bl = bool; using st = string; using pll = pair; using psl = pair; using vst = vector; using vch = vector; using vvch = vector; using vbl = vector; using vvbl = vector; using vdb = vector; using vpll = vector; using vvpll = vector; using vpsl = vector; using vi = vector; using vvi = vector; using vvvi = vector; using vvvvi = vector; using vll = vector; using vvll = vector; using vvvll = vector; using vvvvll = vector; using vvvvvll = vector; #define all(A) A.begin(),A.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rrep(i,a,b) for(ll i=(ll)(a);i<=(ll)(b);i++) #define drep(i,n) for(ll i=(ll)n-1; i>=0; i--) #define drrep(i,a,b) for(ll i=(ll)a; i>=(ll)b; i--) using mint = modint998244353; // using mint = modint1000000007; using vm = vector; using vvm = vector; using vvvm = vector; const ll mod = 998244353; const ll INF = 3e18; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } ll gcd(ll a, ll b) { if (a==0)return b; if (b==0)return a; ll c=a; while(a%b!=0){ c=a%b; a=b; b=c; } return b; } ll lcm(ll a,ll b){ return a/gcd(a,b)*b; } ll Pow(ll a, ll n){ ll res=1; while(n>0){ if(n%2==1)res*=a; a*=a; n/=2; } return res; } ll Pow(ll a, ll n, ll p){ ll res=1; while(n>0){ a%=p; if(n%2==1)res*=a; a*=a; res%=p; n/=2; } return res; } void yn(bl ok){ if(ok==true){ cout << "Yes" << endl; } else{ cout << "No" << endl; } return; } int main(){ ll N=9000; rep(i,9) { cout << (N+2)/3 << (i+1==N?'\n':' '); N=(N+2)/3; } }