using System;
using System.Linq;
public class Program
{
/*
Some people are standing in a row in a park. There are trees between them which cannot be moved.
Your task is to rearrange the people by their heights in a non-descending order without moving the trees.
Example
For a = [-1, 150, 190, 170, -1, -1, 160, 180], the output should be
sortByHeight(a) = [-1, 150, 160, 170, -1, -1, 180, 190].
*/
static void sortByHeight(int[] a)
// fill in
}
public static void Main()
var a = new int[] { -1, 150, 190, 170, -1, -1, 160, 180 } ;
sortByHeight(a);
Console.WriteLine(String.Join(", ", a.Select(v => v.ToString())));