//无向图
#include<cstdio>
#include<cstdlib>
using namespace std;
int n,m,x,y,ji;
int a[101][101],jj[101],s_bian,ans[101],sum;
bool v[101][101];
void euler(int k,int p)
{
if(s_bian==m)
{
if(p==2&&a[k][1])
{
printf("HAVE:HUI
");
printf("1->");
for(int i=1;i<s_bian;i++) printf("%d->",ans[i]);
printf("%d",1);
exit(0);
}
if(p==1&&k==jj[2])
{
printf("HAVE:TONG
%d->",jj[1]);
for(int i=1;i<=n;i++) printf("%d->",ans[i]);
printf("%d",ans[n+1]);
exit(0);
}
return;
}
for(int i=1;i<=a[k][0];i++)
{
if(!v[k][a[k][i]])
{
v[k][a[k][i]]=true;
v[a[k][i]][k]=true;
s_bian++;
ans[s_bian]=a[k][i];
euler(a[k][i],p);
s_bian--;
v[k][a[k][i]]=false;
v[a[k][i]][k]=false;
}
}
}
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++)
{
scanf("%d%d",&x,&y);
a[x][++a[x][0]]=y;
a[y][++a[y][0]]=x;
}
for(int i=1;i<=n;i++)
if(a[i][0]%2) jj[++ji]=i;
if(ji==2)
{
ans[1]=jj[1];
euler(jj[1],1);
}
else if(ji==0)
{
ans[1]=1;
euler(1,2);
}
else printf("NO");
}