#include<bits/stdc++.h>
using namespace std;
int ju[9][9]={{0,0,0,0,0,0,0,0,0},
{0,1,0,0,0,1,0,1,1},
{0,0,1,1,1,1,0,1,1},
{0,0,1,1,0,0,1,1,1},
{0,0,1,0,1,1,1,0,1},
{0,1,1,0,1,1,1,0,0},
{0,0,0,1,1,1,1,1,0},
{0,1,1,1,0,0,1,1,0},
{0,1,1,1,1,0,0,0,1}};
int a[101],b[101];
bool s[9];
void out(int d)
{
cout<<char(a[d]+64);
while(b[d])
{
d=b[d];
cout<<"--"<<char(a[d]+64);
}
}
void bjd()
{
int head=0,tail=1;
a[1]=1;
b[1]=0;
do
{
head++;
for(int i=1;i<=8;i++)
{
if(!(ju[head][i])&&!s[i])
{
tail++;
s[i]=1;
a[tail]=i;
b[tail]=head;
if(i==8)
{
out(tail);
head=tail;
break;
}
}
}
}while(head<tail);
}
int main()
{
bjd();
return 0;
}