Language: C++

#include <algorithm>
#include <iostream> //入出力
#include <stdio.h>
#include <map>
#include <set>
#include <string>
#include <math.h> //算術演算子
#include <vector>
#include <cstdlib>
#include <queue>
#include <stack>
#include <list>
#include <iomanip> //小数点以下を表示させる(setprecision())
// #include <bits/stdc++.h>
using namespace std;
typedef long long ll; //64bit型

#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(a) (a).begin(), (a).end()
#define debug(x) cerr << x << " " \
                      << "(L:" << __LINE__ << ")" << '\n'
#define PRINT(V)                                   \
        {                                          \
                for (int i = 0; i < V.size(); i++) \
                {                                  \
                        cout << V[i] << " ";       \
                }                                  \
                cout << endl;                      \
        }

int gcd(int a, int b)
{
        return b ? gcd(b, a % b) : a;
}
string BinaryNum(int N)
{
        string S;
        while (N != 0)
        {
                if (N % 2 == 1)
                {
                        N--;
                        S = '1' + S;
                }
                else
                {
                        S = '0' + S;
                }
                N /= 2;
        }
        return S;
}

bool binary(vector<int> vec, int key)
{
        int left = 0;
        int right = vec.size();

        while (left < right)
        {
                int mid = (left + right) / 2;
                if (vec[mid] == key)
                {
                        return true;
                }
                else if (vec[mid] > key)
                {
                        right = mid;
                }
                else
                {
                        left = mid + 1;
                }
        }
        return false;
}
int main() //input->compute->output
{
        string Sa, Sb, Sc;
        cin >> Sa >> Sb >> Sc;
        int i = 1;
        int j = 0;
        int k = 0;
        char m = Sa[0];

        while (i <= Sa.length() && j <= Sb.length() && k <= Sc.length())
        {        

                debug(m);
                if (m == 'a')
                {
                        m = Sa[i];
                        i++;
                }
                else if (m == 'b')
                {
                        m = Sb[j];
                        j++;
                }
                else
                {
                        m = Sc[k];
                        k++;
                }
                PRINT(v);
        }
        if (i > Sa.length())
        {
                cout << 'A' << endl;
        }
        else if (j > Sb.length())
        {
                cout << 'B' << endl;
        }
        else
        {
                cout << 'C' << endl;
        }

        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:105:23: error: 'v' was not declared in this scope
  105 |                 PRINT(v);
      |                       ^
a.cc:24:37: note: in definition of macro 'PRINT'
   24 |                 for (int i = 0; i < V.size(); i++) \
      |                                     ^