Language: C++

#pragma warning disable

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Numerics;
using System.Collections;

static class MainClass
{
    public static void Main(string[] args)
    {
        var hw = Console.ReadLine().SplittedStringToInt32List();
        for (int i = 0; i < hw[0]; i++)
        {
            var str = Console.ReadLine();
            Console.WriteLine(str);
            Console.WriteLine(str);
        }

        Console.ReadLine();
    }
    
    


    public static int ParentCount;

    public static int[] Parents;
    public static int[] IfParentsChildrenCount;

    public static int[] Ranks;

    public static void InitializeUnionFind(int N)
    {
        Parents = new int[N];
        Ranks = new int[N];
        IfParentsChildrenCount = new int[N];
        for (int i = 0; i < N; i++)
        {
            Parents[i] = i;
            Ranks[i] = 0;
            IfParentsChildrenCount[i] = 1;
        }
        ParentCount = N + 1;
    }

    public static int Root(int a)
    {
        if (Parents[a] == a)
        {
            return a;
        }
        else
        {
            Parents[a] = Root(Parents[a]);
            return Parents[a];
        }
    }

    public static bool Same(int a, int b)
    {
        return Root(a) == Root(b);
    }

    public static void Unite(int a, int b)
    {
        var parentA = Root(a);
        var parentB = Root(b);
        if (parentA == parentB)
            return;
        if (Ranks[parentA] < Ranks[parentB])
        {
            Parents[parentA] = parentB;
            IfParentsChildrenCount[parentB] += IfParentsChildrenCount[parentA];
            ParentCount -= IfParentsChildrenCount[parentA];

            IfParentsChildrenCount[parentA] = 0;
        }
        else
        {
            Parents[parentB] = parentA;
            if (Ranks[parentA] == Ranks[parentB])
            {
                Ranks[parentA]++;
            }
            IfParentsChildrenCount[parentA] += IfParentsChildrenCount[parentB];
            ParentCount -= IfParentsChildrenCount[parentB];
            IfParentsChildrenCount[parentB] = 0;
        }
    }

    #region ライブラリ

    public static long ToInt64(this string str) => long.Parse(str);
    public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
    public static BigInteger ToBigInteger(this string str) => BigInteger.Parse(str);
    public static List<string> SplittedStringToList(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
    public static List<int> SplittedStringToInt32List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToList();
    public static List<long> SplittedStringToInt64List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => long.Parse(x)).ToList();
    public static List<BigInteger> SplittedStringToBigInteger(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => BigInteger.Parse(x)).ToList();
    public const int INF = int.MaxValue / 4;
    public const long LONGINF = long.MaxValue / 2;
    public const int Mod1e9 = 1000000007;

    public static void PrintArray(char[,] array)
    {
        for (int i = 0; i < array.GetLength(0); i++)
        {
            var sb = new StringBuilder();
            for (int j = 0; j < array.GetLength(1); j++)
            {
                sb.Append(array[i, j]);
            }
            Console.WriteLine(sb.ToString());
        }
    }
    public static int Manhattan(int x1, int x2, int y1, int y2)
    {
        return Math.Abs(x1 - x2) + Math.Abs(y1 - y2);
    }

    public static Dictionary<T, int> ToCountedDictionary<T>(this IEnumerable<T> items)
    {
        var dic = new Dictionary<T, int>();
        foreach (var item in items)
        {
            if (dic.ContainsKey(item))
                dic[item]++;
            else
                dic.Add(item, 1);
        }
        return dic;
    }

    public static long Sums(IEnumerable<int> list)
    {
        var sum = 0l;
        foreach (var item in list)
        {
            sum += item;
        }
        return sum;
        #endregion
    }

    public static int[] dx = new int[] { -1, 1, 0, 0 };
    public static int[] dy = new int[] { 0, 0, 1, -1 };
}



Compiler output:
a.cc:98:6: error: invalid preprocessing directive #region
   98 |     #region ライブラリ
      |      ^~~~~~
a.cc:149:10: error: invalid preprocessing directive #endregion
  149 |         #endregion
      |          ^~~~~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.IO;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Linq;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.Runtime.Serialization.Formatters.Binary;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'System'
    8 | using System.Text;
      |       ^~~~~~
a.cc:9:7: error: expected nested-name-specifier before 'System'
    9 | using System.Text.RegularExpressions;
      |       ^~~~~~
a.cc:10:7: error: expected nested-name-specifier before 'System'
   10 | using System.Diagnostics;
      |       ^~~~~~
a.cc:11:7: error: expected nested-name-specifier before 'System'
   11 | using System.Numerics;
      |       ^~~~~~
a.cc:12:7: error: expected nested-name-specifier before 'System'
   12 | using System.Collections;
      |       ^~~~~~
a.cc:16:11: error: expected ':' before 'static'
   16 |     public static void Main(string[] args)
      |           ^~~~~~~
      |           :
a.cc:16:29: error: 'string' has not been declared
   16 |     public static void Main(string[] args)
      |                             ^~~~~~
a.cc:16:38: error: expected ',' or '...' before 'args'
   16 |     public static void Main(string[] args)
      |                                      ^~~~
a.cc:32:11: error: expected ':' before 'static'
   32 |     public static int ParentCount;
      |           ^~~~~~~
      |           :
a.cc:34:11: error: expected ':' before 'static'
   34 |     public static int[] Parents;
      |           ^~~~~~~
      |           :
a.cc:34:22: error: expected unqualified-id before '[' token
   34 |     public static int[] Parents;
      |                      ^
a.cc:35:11: error: expected ':' before 'static'
   35 |     public static int[] IfParentsChildrenCount;
      |           ^~~~~~~
      |           :
a.cc:35:22: error: expected unqualified-id before '[' token
   35 |     public static int[] IfParentsChildrenCount;
      |                      ^
a.cc:37:11: error: expected ':' before 'static'
   37 |     public static int[] Ranks;
      |           ^~~~~~~
      |           :
a.cc:37:22: error: expected unqualified-id before '[' token
   37 |     public static int[] Ranks;
      |                      ^
a.cc:39:11: error: expected ':' before 'static'
   39 |     public static void InitializeUnionFind(int N)
      |           ^~~~~~~
      |           :
a.cc:53:11: error: expected ':' before 'static'
   53 |     public static int Root(int a)
      |           ^~~~~~~
      |           :
a.cc:66:11: error: expected ':' before 'static'
   66 |     public static bool Same(int a, int b)
      |           ^~~~~~~
      |           :
a.cc:71:11: error: expected ':' before 'static'
   71 |     public static void Unite(int a, int b)
      |           ^~~~~~~
      |           :
a.cc:100:11: error: expected ':' before 'static'
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |           ^~~~~~~
      |           :
a.cc:100:37: error: 'string' has not been declared
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |                                     ^~~~~~
a.cc:100:52: error: invalid pure specifier (only '= 0' is allowed) before 'long'
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |                                                    ^~~~
a.cc:100:44: warning: explicit object member function only available with '-std=c++23' or '-std=gnu++23' [-Wc++23-extensions]
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |                                ~~~~~~~~~~~~^~~
a.cc:100:12: error: an explicit object member function cannot be 'static'
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |            ^~~~~~
a.cc:100:44: note: explicit object parameter declared here
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |                                ~~~~~~~~~~~~^~~
a.cc:100:24: error: initializer specified for static member function 'long int MainClass::ToInt64(this int)'
  100 |     public static long ToInt64(this string str) => long.Parse(str);
      |                        ^~~~~~~
a.cc:101:11: error: expected ':' before 'static'
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |           ^~~~~~~
      |           :
a.cc:101:36: error: 'string' has not been declared
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |                                    ^~~~~~
a.cc:101:51: error: invalid pure specifier (only '= 0' is allowed) before 'str'
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |                                                   ^~~
a.cc:101:43: warning: explicit object member function only available with '-std=c++23' or '-std=gnu++23' [-Wc++23-extensions]
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |                               ~~~~~~~~~~~~^~~
a.cc:101:12: error: an explicit object member function cannot be 'static'
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |            ^~~~~~
a.cc:101:43: note: explicit object parameter declared here
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |                               ~~~~~~~~~~~~^~~
a.cc:101:23: error: initializer specified for static member function 'int MainClass::ToInt32(this int)'
  101 |     public static int ToInt32(this string str) => str == "" ? 0 : int.Parse(str);
      |                       ^~~~~~~
a.cc:102:11: error: expected ':' before 'static'
  102 |     public static BigInteger ToBigInteger(this string str) => BigInteger.Parse(str);
      |           ^~~~~~~
      |           :
a.cc:102:19: error: 'BigInteger' does not name a type
  102 |     public static BigInteger ToBigInteger(this string str) => BigInteger.Parse(str);
      |                   ^~~~~~~~~~
a.cc:103:11: error: expected ':' before 'static'
  103 |     public static List<string> SplittedStringToList(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
      |           ^~~~~~~
      |           :
a.cc:103:19: error: 'List' does not name a type
  103 |     public static List<string> SplittedStringToList(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
      |                   ^~~~
a.cc:103:96: error: expected unqualified-id before ',' token
  103 |     public static List<string> SplittedStringToList(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
      |                                                                                                ^
a.cc:104:11: error: expected ':' before 'static'
  104 |     public static List<int> SplittedStringToInt32List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToList();
      |           ^~~~~~~
      |           :
a.cc:104:19: error: 'List' does not name a type
  104 |     public static List<int> SplittedStringToInt32List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToList();
      |                   ^~~~
a.cc:104:98: error: expected unqualified-id before ',' token
  104 |     public static List<int> SplittedStringToInt32List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToList();
      |                                                                                                  ^
a.cc:105:11: error: expected ':' before 'static'
  105 |     public static List<long> SplittedStringToInt64List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => long.Parse(x)).ToList();
      |           ^~~~~~~
      |           :
a.cc:105:19: error: 'List' does not name a type
  105 |     public static List<long> SplittedStringToInt64List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => long.Parse(x)).ToList();
      |                   ^~~~
a.cc:105:99: error: expected unqualified-id before ',' token
  105 |     public static List<long> SplittedStringToInt64List(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => long.Parse(x)).ToList();
      |                                                                                                   ^
a.cc:106:11: error: expected ':' before 'static'
  106 |     public static List<BigInteger> SplittedStringToBigInteger(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => BigInteger.Parse(x)).ToList();
      |           ^~~~~~~
      |           :
a.cc:106:19: error: 'List' does not name a type
  106 |     public static List<BigInteger> SplittedStringToBigInteger(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => BigInteger.Parse(x)).ToList();
      |                   ^~~~
a.cc:106:106: error: expected unqualified-id before ',' token
  106 |     public static List<BigInteger> SplittedStringToBigInteger(this string str) => str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(x => BigInteger.Parse(x)).ToList();
      |                                                                                                          ^
a.