using namespace std
struct queue{
int rear
int front
int a[MAXSIZE]
}q
void initQueue(queue &q){
q.front=0
q.rear=0
}
void push(queue &q,int x){//前提:队列未满
q.a[q.rear]=x
q.rear=(q.rear+1)%MAXSIZE
}
void pop(queue &q){//前提:队列未空
q.front=(q.front+1)%MAXSIZE
}
int getHead(queue &q){
return q.a[q.front]
}
int main(){
int N
cin>>N
initQueue(q)
push(q,1)
for(int n=2
push(q,1)
for(int i=1
int t=getHead(q)
pop(q)
cout<<t<<" "
int x=getHead(q)
t+=x
push(q,t)
}
push(q,1)
cout<<getHead(q)
pop(q)
cout<<endl
}
while(q.front!=q.rear){
cout<<getHead(q)<<" "
pop(q)
}
return 0
}