using System.Collections;
using System.Collections.Generic;
using static System.Math;
for(int y = 0; y < lines.Length * folds; y++)
int yIntermediate = y % (lines.Length * 2) - lines.Length;
if(yIntermediate < 0) yIntermediate++;
int yIndex = Abs(yIntermediate);
for(int x = 0; x < 3 * folds; x++)
int xIntermediate = x % (lines.Length * 2) - lines.Length;
if(xIntermediate < 0) xIntermediate++;
int xIndex = Abs(xIntermediate);
Console.Write(lines[yIndex][xIndex]);