先进先出
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<stack>
#include<string.h>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<set>
using namespace std;
int main(){
queue<char> q;
int n;
char x;
cin>>n;
for(int i=0;i<n;i++){
cin>>x;
q.push(x);
}
cout<<q.size()<<endl;
cout<<q.empty()<<endl;
cout<<q.front()<<endl;
cout<<q.back()<<endl;
while(!q.empty()){
cout<<q.front()<<endl;
q.pop();
}
return 0;
}