#include <iostream>
#include <cstring>
using namespace std;

int dx[] = { 0, 1, 0, -1 };
int dy[] = { 1, 0, -1, 0 };

int main()
{
	int W,H,N;
	while (cin >> W >> H >> N, W||H||N)
	{
		int a[2*H+1][2*W+1]; //a[y][x]
		memset(a, 0, sizeof(a));
		for (int i=0; i<=2*W; i++)
		{
			a[  0][i] = -1;
			a[2*H][i] = -1;
		}
		for (int i=0; i<=2*H; i++)
		{
			a[i][  0] = -1;
			a[i][2*W] = -1;
		}

		int x1,x2,y1,y2;
		for (int i=0; i<N; i++)
		{
			cin >> x1 >> y1 >> x2 >> y2;
			if (x1 == x2)
				for (int y=2*min(y1,y2); y<=2*max(y1,y2); y++)
					a[y][2*x1] = -1;
			else
				for (int x=2*min(x1,x2); x<=2*max(x1,x2); x++)
					a[2*y1][x] = -1;
		}
		int xg, yg;
		cin >> x1 >> y1 >> x2 >> y2 >> xg >> yg;

		a[y1+y2][x1+x2] = 0;
		int px=x1+x2, py=y1+y2;
		if (x1==x2)
			px += (x1==0?1:-1);
		else
			py += (y1==0?1:-1);

		int dir = (x1==x2 ? (x1==0 ? 1 : 3) : (y1==0 ? 0 : 2));
		//int pd = -1;
		int co = 1;
		bool f=1/*, pf=0*/;

		/*
		for (int y=0; y<=2*H; y++)
		{
			for (int x=0; x<=2*W; x++)
				cout << (a[2*H-y][x]==-1?'#':' ');
			cout << endl;
		}
		*/

		a[py][px] = 1;
		while (f)
		{
			//cout << "dir:" << dir << ", co:" << co << ",pd:" << pd << ",(" << py << ',' << px << ')' << endl;
			if (px==2*xg+1 && py==2*yg+1)
				break;

			if (a[py+dy[(dir+3)%4]][px+dx[(dir+3)%4]]==0)
				dir = (dir+3)%4;
			else
				while (a[py+dy[dir]][px+dx[dir]] != 0)
					dir = (dir+1)%4;

			px += 2*dx[dir]; py+= 2*dy[dir];
			if (px<0||py<0||px>2*W||py>2*H)
			{
				f=0; break;
			}

			co++;
			/*
			if (pf && co-a[py][px] == pd)
			{
				f=0; break;
			}

			if (a[py][px]==0)
				pf=0;
			else
				pf=1;
			pd = co-a[py][px];
			a[py][px] = co;
			*/
		}

		if (f)
			cout << co << endl;
		else
			cout << "Impossible" << endl;
	}
}