#include <iostream>
#include <vector>
#include <sstream>

using namespace std;

int main() {
    int n;
    cin >> n;

    vector<string> arr(n);
    float temp;

    // Read n float values as strings
    for (int i = 0; i < n; i++) {
        cin >> arr[i];
        stringstream ss(arr[i]);
        if (!(ss >> temp) || (ss.peek() != EOF)) {
            cout << "Invalid input" << endl;
            return 0;
        }
    }

    // Read the new value as string
    string newValueStr;
    cin >> newValueStr;
    stringstream ss(newValueStr);
    if (!(ss >> temp) || (ss.peek() != EOF)) {
        cout << "Invalid input" << endl;
        return 0;
    }

    // Append new value
    arr.push_back(newValueStr);

    // Print all values space-separated
    for (size_t i = 0; i < arr.size(); ++i) {
        cout << arr[i];
        if (i != arr.size() - 1)
            cout << " ";
    }
    cout << endl;

    return 0;
}