using System.Collections.Generic;
using System.Threading.Tasks;
namespace MatrixOfPalindromes
public static void Main()
Console.WriteLine("Program to generate a matrix of palindromes of 3 letters with r rows and c columns");
Console.WriteLine("Write r = ");
int r = int.Parse(Console.ReadLine());
Console.WriteLine("Write c = ");
int c = int.Parse(Console.ReadLine());
string[,] matrix = new string[r, c];
for (int i = 0; i < r; i++)
for (int j = 0; j < c; j++)
string word = ch1.ToString() + ch2.ToString() + ch1.ToString();
Console.WriteLine("The matrix with {0} rows and {1} columns with palindromes is:", r, c);
for (int i = 0; i < r; i++)
for (int j = 0; j < c; j++)
Console.Write(matrix[i, j] + " ");