using System;
public class Program
{
public static void Main()
int[] a = {2,3,6,6,8,9,10,10,10,12,12};
int[] b = new int[a.Length];
removeDuplicates(a);
}
public static void removeDuplicates(int[] input){
int j = 0;
int i = 1;
//return if the array length is less than 2
if(input.Length < 2){
return;
while(i < input.Length){
if(input[i] == input[j]){
i++;
}else{
input[++j] = input[i++];
// int[] output = new int[j+1];
for(int k=0; k<j+1; k++){
Console.WriteLine(input[k]);