#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
v.push_back(10);
v.push_back(20);
v.push_back(30);
v.pop_back();
v[1] = 40;
cout << v.size() << " " << v.front() << " " << v.back() << endl;
return 0;
}