using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace choice
{
class Program
{
static void Main(string[] args)
{
int count=0;
int sum = 0;
int[] sort = new int[10];
for (int i = 0; i < 10; i++)
{
sort[i] = i + 1;
}
for (int j = 0; j < 10&&sum<9; j++)
{
if (sort[j] != 0)
{
Console.WriteLine(sort[j]);
count = (count + 1) % 3;
if (count == 0)
{
sort[j] = 0;
sum+=1;
}
}
if (j == 9)
{
j =-1;
}
}
for (int n = 0; n < 10; n++)
{
if (sort[n] != 0)
Console.Write(sort[n]);
Console.WriteLine();
}
Console.ReadKey();
}
}
}