#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;
    cin >> n;

    vector<int> events(n);
    for (int i = 0; i < n; i++) {
        if (!(cin >> events[i])) {
            cout << "Invalid input\n";
            return 0;
        }
    }

    int val;
    if (!(cin >> val)) {
        cout << "Invalid input\n";
        return 0;
    }

    int pos = n / 2;  // Insert just after the first half

    events.insert(events.begin() + pos, val);

    for (int e : events) {
        cout << e << " ";
    }
    cout << "\n";

    return 0;
}