#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    while (1)
    {
        string d[8];
        rep(i, 8)
        {
            cin >> d[i];
            if (cin.eof())
                return 0;
        }

        int st_x, st_y, ed_x, ed_y;
        rep(i, 8)
        {
            int flag = 0;
            rep(j, 8)
            {
                if (d[i][j] == '1')
                {
                    st_x = j, st_y = i;
                    flag = 1;
                    break;
                }
            }
            if (flag == 1)
                break;
        }
        rep(i, 8)
        {
            rep(j, 8)
            {
                if (d[i][j] == '1')
                {
                    ed_x = j, ed_y = i;
                }
            }
        }

        int dis_x = ed_x - st_x, dis_y = ed_y - st_y;

        if (dis_y == 0)
        {
            OP("C")
        }
        else if (dis_y == 1)
        {

            if (dis_x == 0)
                OP("G")
            if (dis_x == 1)
                OP("A")
            if (dis_x == 2)
                OP("E")
        }
        else if (dis_y == 2)
        {
            if (dis_x == -1)
                OP("D")
            if (dis_x == 1)
                OP("F")
        }
        else if (dis_y == 3)
        {
            OP("B")
        }
    }

    return 0;
}
