#!/usr/bin/env python
# coding: utf-8

# In[1]:


l=[]
c=[]
n=int(input())
for i in range(n):
    x=int(input())
    l.append(x)
print(l)
for i in l:
    if i>0:
        c.append(i)
print(c)


# In[ ]:




