using System;
using System.Linq;
class Program {
static void Main() {
int n = Convert.ToInt32(Console.ReadLine());
int[] a = new int[n];
Random r = new Random();
for (int i = 0; i < a.Length; i++) {
a[i] = r.Next(-100, 101);
Console.Write(a[i] + " ");
}
Console.WriteLine();
int min = a.Min();
int im = 0, k = 0;
while (a[im] != min) {
if (a[im] < 0 && a[im] !=min) k++;
im++;
int nb = n - k;
int[] b = new int[nb];
int j = 0;
for (int i = 0; i < n; i++ ) {
if (i < im && a[i] < 0);
else {
b[j] = a[i];
j++;
foreach (int i in b)
Console.Write (i + " ");
using System;
using System.Linq;
class Program {
static void Main() {
int n = Convert.ToInt32(Console.ReadLine());
int[] a = new int[n];
Random r = new Random();
for (int i = 0; i < a.Length; i++) {
a[i] = r.Next(-100, 101);
Console.Write(a[i] + " ");
}
Console.WriteLine();
int min = a.Min();
int im = 0, k = 0;
while (a[im] != min) {
if (a[im] < 0 && a[im] !=min) k++;
im++;
}
int nb = n - k;
int[] b = new int[nb];
int j = 0;
for (int i = 0; i < n; i++ ) {
if (i < im && a[i] < 0);
else {
b[j] = a[i];
j++;
}
}
foreach (int i in b)
Console.Write (i + " ");
}
}