Vitaly has an array of *n* distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold: 
 1.  The product of all numbers in the first set is less than zero ( &lt; 0). 1.  The product of all numbers in the second set is greater than zero ( &gt; 0). 1.  The product of all numbers in the third set is equal to zero. 1.  Each number from the initial array must occur in exactly one set. 
Help Vitaly. Divide the given array.
The first line of the input contains integer *n* (3 ≤ *n* ≤ 100). The second line contains *n* space-separated distinct integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (|*a*<sub class="lower-index">*i*</sub>| ≤ 10<sup class="upper-index">3</sup>) — the array elements.
n=int(input())
s=list(map(int,input().split()))
a=list()
b=list()
c=list()
pd=0
zc=0
s.sort()
for i in range(0,len(s)):
    if(pd==0 and s[i]<0):
        pd=1
        a.append(s[i])
        continue
    if(i==1 and s[1]<0 and s[2]<0):
        b.append(s[1])
        b.append(s[2])
        i=2
        continue
    if(zc==0 and s[i]>0):
        zc=1
        b.append(s[i])
        continue
    c.append(s[i])
print('%d %d' %(len(a),a[0]))
print(len(b),end='')
for i in range(0,len(b)):
    print(' %d' %b[i],end='')
print('')
print(len(c),end='')
for i in range(0,len(c)):
    print(' %d' %c[i],end='')
  				    	 		    	 	 		 			