//* Problem  : G
//* Contest  : acm.tju.edu.cn
//* Origin   : Greater New York 2000
//* Type     : Solution
//* Date     : 2008.05.29
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 8.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <iostream>
using namespace std;
#define int64 long long

struct ppoint{
	int a[10];
}p0, pn, a[1024][2];

int n, k;

int cmp(ppoint a, ppoint b)
{
	for (int i = 0; i < n; i++)
		if (a.a[i] != b.a[i]) return a.a[i] - b.a[i];
	return 0;
}

int cmp2(ppoint a, ppoint b)
{
	int res = 0;
	for (int i = 0; i < n; i++)
		res += abs(a.a[i] - b.a[i]);
	return res == 1;
}

class cmp_ppoint{
public:
	bool operator() (ppoint x, ppoint y)
	{
		for (int i = 0; i < n; i++)
			if (x.a[i] > y.a[i])return 1;
		return 0;
	}
};
int bfs()
{
	set <ppoint, cmp_ppoint> s;
	queue <ppoint> q; q.push(p0); s.insert(p0);
	while (!q.empty())
	{
		ppoint p; p = q.front(); q.pop();
		if (cmp(p, pn) == 0) return 1;
		for (int i = 0; i < k; i++)
		{
			if (cmp2(p, a[i][0]))
			{
				if (s.find(a[i][1]) == s.end())
				{
					q.push(a[i][1]); s.insert(a[i][1]);
				}
			}
			else if (cmp2(p, a[i][1]))
			{
				if (s.find(a[i][0]) == s.end())
				{
					q.push(a[i][0]); s.insert(a[i][0]);
				}
			}
		}
	}
	return 0;
}

int main()
{
#ifdef _DEBUG
 	freopen("h.in", "r", stdin);
#endif
	int it = 0;
	while (scanf("%d", &n) && n)
	{
		for (int i = 0; i < n; i++)
			scanf("%d", &p0.a[i]);
		for (int i = 0; i < n; i++)
			scanf("%d", &pn.a[i]);
		k = 0;
		while (1)
		{
			scanf("%d", &a[k][0].a[0]);
			if (a[k][0].a[0] < 0) break;
			for (int i = 1; i < n; i++)
				scanf("%d", &a[k][0].a[i]);
			for (int i = 0; i < n; i++)
				scanf("%d", &a[k][1].a[i]);
			k++;
		}
		if (bfs())
			printf("Maze #%d can be travelled\n", ++it);
		else
			printf("Maze #%d cannot be travelled\n", ++it);
	}
	return 0;
}
