/*判断是否有欧拉回路,即判断是否为欧拉图
条件1:图连通:用并查集判断
2:不含奇度顶点
*/
#include <cstdio>
#include <cstring>
#define N 1000
using namespace std;
int n, m;
int f[N],degree[N];//记录第i点的度数
void init()
{
for (int i = 1; i <= n; i++)
f[i] = i;
}
int find(int x)
{
return x == f[x] ? x : f[x] = find(f[x]);
}
void merge(int x, int y)
{
int t1, t2;
t1 = find(x); t2 = find(y);
if (t1 != t2) f[t2] = t1;
else return;
}
int isEuler()
{
for (int i = 1; i <= n; i++)
if (degree[i] & 1) return 0;
return 1;
}
int isconnect()
{
int cnt = 0;
for (int i = 1; i <= n; i++)
{
if (f[i] == i)
cnt++;
}
if (cnt == 1) return 1;
else return 0;
}
int main()
{
while (scanf("%d", &n) != EOF && n)
{
init();
memset(degree, 0, sizeof(degree));
scanf("%d", &m);