#include <bits/stdc++.h>
/*
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
*/
using namespace std;
const double eps = 1e-10;
const double pi = 3.1415926535897932384626433832795;
const double eln = 2.718281828459045235360287471352;
#define f(i, a, b) for (int i = a; i <= b; i++)
#define scan(x) scanf("%d", &x)
#define mp make_pair
#define pb push_back
#define lowbit(x) (x&(-x))
#define fi first
#define se second
#define SZ(x) int((x).size())
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define summ(a) (accumulate(all(a), 0ll))
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
using ll=long long;
ll n,a[1<<24],b[1<<24],rev[1<<24],bit,len,inv[1<<24],fac[1<<24];
const int mod=167772161,g=3,gi=55924054;
ll powmod(ll a,ll b){
ll res=1;
for(;b>0;b>>=1,a=a*a%mod)if(b&1)res=res*a%mod;
return res;
}
inline void NTT(ll *a,int type){
for(int i=0;i<len;++i){
if(i<rev[i])swap(a[i],a[rev[i]]);
}
for(int i=1;i<len;i<<=1){
ll gn=powmod(type?g:gi,(mod-1)/(i<<1));
for(int j=0;j<len;j+=(i<<1)){
ll g0=1;
for(int k=0;k<i;++k,g0=g0*gn%mod){
ll x=a[j+k],y=g0*a[i+j+k]%mod;
a[j+k]=(x+y)%mod;
a[i+j+k]=(x-y+mod)%mod;
}
}
}
if(type==1)return ;
ll invl=powmod(len,mod-2);
for(int i=0;i<len;++i)a[i]=a[i]*invl%mod;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin>>n;
fac[1]=fac[0]=1,inv[0]=1;
for(int i=2;i<=n;++i)fac[i]=fac[i-1]*i%mod;
inv[n]=powmod(fac[n],mod-2);
for(int i=n-1;i;--i)inv[i]=inv[i+1]*(i+1)%mod;
for(int i=0;i<=n;++i)a[i]=(i&1)?(mod-inv[i]):inv[i],b[i]=powmod(i,n)*inv[i]%mod;
while((1<<bit)<=(n<<1))bit+=1;
len=1<<bit;
for(int i=0;i<len;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<(bit-1));
NTT(a,1),NTT(b,1);
for(int i=0;i<len;++i)a[i]=a[i]*b[i]%mod;
NTT(a,0);
for(int i=0;i<=n;++i)cout<<a[i]<<" \n"[i==n];
return 0;
}