using System;
public class Program
{
public static void Main()
int temp, j, i;
int N = 8;
int[] a = {6, 5, 3, 1, 8, 7, 2, 4};
for(i = 1; i < N; i++){
for(j = 0; j < N - 1; j++){
if(a[j] > a[j + 1]){
temp = a[j];
a[j] = a[j + 1];
a[j + 1] = temp;
}
for(i = 0; i < N; i++){
Console.WriteLine(a[i]);