#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;
    
    // Read number of existing transactions
    if (!(cin >> n) || n < 0 || n > 1000) {
        cout << "Invalid input" << endl;
        return 0;
    }

    // Array to hold existing transactions + new transaction
    double arr[n + 1];

    // Read existing transactions
    for (int i = 0; i < n; i++) {
        if (!(cin >> arr[i])) {
            cout << "Invalid input" << endl;
            return 0;
        }
    }

    // Read new transaction amount
    double newValue;
    if (!(cin >> newValue)) {
        cout << "Invalid input" << endl;
        return 0;
    }

    // Append new transaction at the end
    arr[n] = newValue;

    // Print updated transactions
    for (int i = 0; i <= n; i++) {
        cout << arr[i] << " ";
    }

    return 0;
}