using System;
public class Program
{
static void printNum(int[] x) {
for(int i = 0; i<x.Length; i++){
if(x[i] < 0){
return;
}
if(x.Length > 1 && x[i]==0 && x[i+1]==0){ // To avoid error if x.Lenght is less than 2.
Console.WriteLine(x[i]);
public static void Main()
int[] a = {};
printNum(a);