//editor1
#include <stdio.h>
#include <stdlib.h>
struct Node {
    float data;
    struct Node *next;
};

struct Node* create(float value) {
    struct Node newnode = (struct Node)malloc(sizeof(struct Node));
    newnode->data = value;
    newnode->next = NULL;
    return newnode;
}
void insert(struct Node **head, float value) {
    struct Node *newnode = create(value);
    if (*head == NULL) {
        *head = newnode;
    } else {
        struct Node *temp = *head;
        while (temp->next != NULL) {
            temp = temp->next;
        }
        temp->next = newnode;
    }
}
void printList(struct Node *head) {
    struct Node *temp = head;
    while (temp != NULL) {
        if (temp->data == (int)temp->data) {
            printf("%.1f ", temp->data);
        } else {
            printf("%g ", temp->data);
        }
        temp = temp->next;
    }
}
int main() {
    int n;
    scanf("%d", &n);

    struct Node *head = NULL;

    for (int i = 0; i < n; i++) {
        float value;
        if (scanf("%f", &value) != 1) {
            printf("Invalid input");
            return 0;
        }
        insert(&head, value);
    }

    float newvalue;
    if (scanf("%f", &newvalue) != 1) {
        printf("Invalid input");
        return 0;
    }
    insert(&head, newvalue);

    printList(head);

    return 0;
}