// editor1
#include <stdio.h>
#include <stdlib.h>
#include<ctype.h>
struct node
{
    float data;
    struct node* next;
}*head=NULL,*tail;
int main()
{
    int n,flag=0;
    if(scanf("%d",&n)!=1)
    {
        printf("Invalid input ");
        return 0;
    }
    if((n<=0)||(n>1000))
    {
    if(n==0)
    {
       float f;
    if(scanf("%f",&f)!=1)
    {
        printf("Invalid input");
        return 0;
    }
    struct node* newnode=(struct node*)malloc(sizeof(struct node));
    newnode->data=f;
    newnode->next=NULL;
    head=newnode;
    tail=newnode;
    printf("%g",head->data);
    return 0;
    }
    else
    {
        printf("Invalid input");
        return 0;
    }
    }
    int i;
    for(i=0;i<n;i++)
    {
        struct node* newnode=(struct node*)malloc(sizeof(struct node));
       if( scanf("%f",&newnode->data)!=1)
       {
           printf("Invalid input");
           return 0;
       }
       
        if(head==NULL)
        {
            head=newnode;
            tail=newnode;
            head->next=NULL;
        }else
        {
            tail->next=newnode;
            tail=newnode;
            newnode->next=NULL;
        }
    }
    float f;
    if(scanf("%f",&f)!=1)
    {
        printf("Invalid input");
        return 0;
    }
    struct node* newnode=(struct node*)malloc(sizeof(struct node));
    newnode->data=f;
    newnode->next=NULL;
    tail->next=newnode;
    tail=newnode;
    while(head)
    {
        if(head->data==(int)head->data)
        printf("%.1f ",head->data);
        else
        printf("%g ",head->data);
        head=head->next;
    }
}