#include <iostream>
#include <deque>
using namespace std;
int main() {
deque<string> cars = {"Volvo", "BMW", "Ford", "Tesla"};
// 移除首元素
cars.pop_front();
// 移除尾元素
cars.pop_back();
// 打印双端队列元素
for (string car : cars) {
cout << car << "\n";
}
return 0;