namespace _06.StuckZipper
using System.Collections.Generic;
public static void Main()
List<int> firstList = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
List<int> secondList = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
int minLenght = TakeMinLenghtOfNumbers(firstList, secondList);
firstList = RemoveBigerValues(minLenght, firstList);
secondList = RemoveBigerValues(minLenght, secondList);
int maxCount = Math.Max(firstList.Count, secondList.Count);
List<int> zippList = new List<int>();
for (int i = 0; i <= maxCount; i++)
if (i < secondList.Count)
zippList.Add(secondList[i]);
zippList.Add(firstList[i]);
Console.WriteLine(string.Join(" ", zippList));
private static int TakeMinLenghtOfNumbers(List<int> firstList, List<int> secondList)
int minLenght = int.MaxValue;
for (int i = 0; i < firstList.Count - 1; i++)
currentLenght = (Math.Abs(firstList[i])).ToString().Length;
if (currentLenght < minLenght)
minLenght = currentLenght;
for (int i = 0; i < secondList.Count - 1; i++)
currentLenght = (Math.Abs(secondList[i])).ToString().Length;
if (currentLenght < minLenght)
minLenght = currentLenght;
private static List<int> RemoveBigerValues(int minLenght, List<int> list)
for (int i = 0; i < list.Count; i++)
currentLenght = (Math.Abs(list[i])).ToString().Length;
if (currentLenght > minLenght)