using System.Collections.Generic;
using System.Threading.Tasks;
namespace PrintingTriangle
public class PrintingTriangle
public static void Main(string[] args)
int num = int.Parse(Console.ReadLine());
private static void PrintLine(int counter, int num)
for (int cow = 1; cow <= num; cow++)
for (int row = 1; row <= counter; row++)
Console.Write(row + " ");
for (int cow = 1; cow <= num; cow++)
for (int row = 1; row <= counter - 2; row++)
Console.Write(row + " ");