#include #include #include #include #define pi 3.141592653589793238462643387using namespace std;int n,m,v=1,rev[10000000],len;struct f{ double x,y; f(double xx=0,double yy=0){x=xx;y=yy;} f operator +(const f &rhs)const{ return f(x+rhs.x,y+rhs.y); }f operator -(const f &rhs)const{ return f(x-rhs.x,y-rhs.y); }f operator *(const f &rhs)const{ return f(x*rhs.x-y*rhs.y,x*rhs.y+y*rhs.x); }}a[10000000],b[10000000];void fft(f *a,int t){ for(int i=0;i >1]>>1)|((i&1)<<(len-1)); fft(a,1);fft(b,1); for(int i=0;i<=v;i++)a[i]=a[i]*b[i];fft(a,-1); for(int i=0;i<=n+m;i++)printf("%d ",(int)(a[i].x/v+0.5)); return 0;}