#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
#include <vector>
#include <map>
#include <stack>
#include <cmath>
#include <iomanip>
#include <set>
#include <cmath>
#include <cctype>
#include<climits>
//INT_MAX 32 bit int
//LLONG_MAX 64 bit int
//LONG_MAX 64 bit int
using namespace std;
#define SPO(n) fixed << setprecision(n)
#define endl '\n'
#define ifor(i, l, r) for (long long(i) = (l); (i) <= (r); ++(i))
#define rfor(i, r, l) for (long long(i) = (r); (i) >= (l); --(i))
typedef long long ll;
typedef pair<int, int> P;
typedef unsigned long long ull;
const int IINF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1.0e-9;
const long long MOD = 1e9 + 7;
const long long MAX = 1e5 + 5;
struct sun {
int a;
int b;
bool operator<(const struct sun &d) const {
return this->b < d.b;
}
};
sun node[3] = {{12, 56},
{89, 3},
{5, 637}};
bool cmp(int &a ,int &b)
{
return a>b;
}
int main() {
string s;
stack<int> a;
a.push(4);
cout << a.top() << endl;
a.pop();
a.emplace(56);
cout << a.top() << endl;
a.pop();
if (a.empty())
cout << "Afds" << endl;
queue<int> b;
b.push(560);
b.push(45);
while (!b.empty()) {
cout << b.front() << " " << b.back() << endl;
b.pop();
}
priority_queue<sun, vector<sun> > c;
ifor(i, 1, 4) {
c.push(sun{1, i});
}
while (!c.empty()) {
cout << (c.top()).b << " ";
c.pop();
}
cout<<endl;
priority_queue<int,vector<int>> d;
d.push(56);
d.push(0);
d.push(4);
d.push(100);
while(!d.empty())
{
cout<<d.top()<<" ";
d.pop();
}
cout<<endl;
int acc[5]={0,5,89,1,2};
sort(acc,acc+5,cmp);
for(auto a:acc)
{
cout<<a<<" ";
}
return 0;
}