Language: C++

using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        int H = 0;
        int W = 0;
        List<int> Hnum = new List<int>();
        List<int> Wnum = new List<int>();

        while (true)
        {
            HandW(ref H, ref W);

            if (H == 0 && W == 0)
                break;

            Hnum.Add(H);
            Wnum.Add(W);
        }


        for (int i = 0; i <= Wnum.Count-1; i++)

        {
            for (int i1 = 0; i1 <= Hnum[i]; i1++)
            {
                if (i1 % 2 == 0)
                {
                    for (int i2 = 0; i2 <= Wnum[i]; i2++)
                    {
                        if (i2 % 2 == 0)
                            Console.Write("#");
                        else
                            Console.Write(".");
                    }
                }
                else
                {
                    for (int i2 = 0; i2 <= Wnum[i]; i2++)
                    {
                        if (i2 % 2 == 0)
                            Console.Write(".");
                        else
                            Console.Write("#");
                    }
                }

                Console.WriteLine();
            }

            Console.WriteLine();
        }


    }

    static void HandW(ref int x,ref int y)
    {
      
        string[] str = Console.ReadLine().Split(' ');
        x = int.Parse(str[0]);
        y = int.Parse(str[1]);
  
    }

   
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:60:23: error: 'ref' has not been declared
   60 |     static void HandW(ref int x,ref int y)
      |                       ^~~
a.cc:60:23: error: two or more data types in declaration of 'x'
a.cc:60:32: error: expected ')' before ',' token
   60 |     static void HandW(ref int x,ref int y)
      |                      ~         ^
      |                                )
a.cc:60:33: error: variable or field 'ref' declared void
   60 |     static void HandW(ref int x,ref int y)
      |                                 ^~~
a.cc:60:33: error: expected ';' at end of member declaration
   60 |     static void HandW(ref int x,ref int y)
      |                                 ^~~
      |                                    ;
a.cc:60:41: error: expected ';' at end of member declaration
   60 |     static void HandW(ref int x,ref int y)
      |                                         ^
      |                                          ;
a.cc:60:42: error: expected unqualified-id before ')' token
   60 |     static void HandW(ref int x,ref int y)
      |                                          ^
a.cc:70:2: error: expected ';' after class definition
   70 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:10:9: error: 'List' was not declared in this scope
   10 |         List<int> Hnum = new List<int>();
      |         ^~~~
a.cc:10:14: error: expected primary-expression before 'int'
   10 |         List<int> Hnum = new List<int>();
      |              ^~~
a.cc:11:14: error: expected primary-expression before 'int'
   11 |         List<int> Wnum = new List<int>();
      |              ^~~
a.cc:15:19: error: 'ref' was not declared in this scope
   15 |             HandW(ref H, ref W);
      |                   ^~~
a.cc:15:30: error: expected ')' before 'W'
   15 |             HandW(ref H, ref W);
      |                              ^
a.cc:15:18: note: to match this '('
   15 |             HandW(ref H, ref W);
      |                  ^
a.cc:20:13: error: 'Hnum' was not declared in this scope; did you mean 'enum'?
   20 |             Hnum.Add(H);
      |             ^~~~
      |             enum
a.cc:21:13: error: 'Wnum' was not declared in this scope; did you mean 'enum'?
   21 |             Wnum.Add(W);
      |             ^~~~
      |             enum
a.cc:25:30: error: 'Wnum' was not declared in this scope; did you mean 'enum'?
   25 |         for (int i = 0; i <= Wnum.Count-1; i++)
      |                              ^~~~
      |                              enum
a.cc:28:36: error: 'Hnum' was not declared in this scope; did you mean 'enum'?
   28 |             for (int i1 = 0; i1 <= Hnum[i]; i1++)
      |                                    ^~~~
      |                                    enum
a.cc:35:29: error: 'Console' was not declared in this scope
   35 |                             Console.Write("#");
      |                             ^~~~~~~
a.cc:37:29: error: 'Console' was not declared in this scope
   37 |                             Console.Write(".");
      |                             ^~~~~~~
a.cc:45:29: error: 'Console' was not declared in this scope
   45 |                             Console.Write(".");
      |                             ^~~~~~~
a.cc:47:29: error: 'Console' was not declared in this scope
   47 |                             Console.Write("#");
      |                             ^~~~~~~
a.cc:51:17: error: 'Console' was not declared in this scope
   51 |                 Console.WriteLine();
      |                 ^~~~~~~
a.cc:54:13: error: 'Console' was not declared in this scope
   54 |             Console.WriteLine();
      |             ^~~~~~~