import java.util.Scanner;

public class TransactionDataStructure {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        try {
            // Read the number of existing transactions
            int n = Integer.parseInt(sc.nextLine());

            // Validate input range
            if (n < 0 || n > 1000) {
                System.out.println("Invalid input");
                return;
            }

            // Create array to store existing transactions + new one
            double[] transactions = new double[n + 1];

            // Read existing transactions
            String[] existing = sc.nextLine().split(" ");
            if (existing.length != n) {
                System.out.println("Invalid input");
                return;
            }

            for (int i = 0; i < n; i++) {
                transactions[i] = Double.parseDouble(existing[i]);
            }

            // Read new transaction
            double newTransaction = Double.parseDouble(sc.nextLine());

            // Append new transaction at the end
            transactions[n] = newTransaction;

            // Print updated transactions
            for (double t : transactions) {
                System.out.print(t + " ");
            }

        } catch (NumberFormatException e) {
            System.out.println("Invalid input");
        }
    }
}