unittest
{
	assert( [ "4 5", "##...", ".##..", "..##.", "...##" ].parse.expand.solve == "Possible" );
	assert( [ "5 3", "###", "..#", "###", "#..", "###" ].parse.expand.solve == "Impossible" );
	assert( [ "4 5", "##...", ".###.", ".###.", "...##" ].parse.expand.solve == "Impossible" );
}



import std.conv;
import std.container;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto hw = input.front.split.to!( long[] );
	auto ass = new dchar[][]( hw[ 0 ], hw[ 1 ] );
	foreach( ref as; ass )
	{
		input.popFront;
		as = input.front.to!( dchar[] );
	}
	return tuple( ass );
}

auto solve( dchar[][] ass )
{
	auto pss = new long[][]( ass.length, ass[ 0 ].length );
	pss[ 0 ][ 0 ] = 1;
	auto queue = make!DList( tuple( 0L, 0L ) );
	while( !queue.empty )
	{
		auto fy = queue.front[ 0 ];
		auto fx = queue.front[ 1 ];
		queue.removeFront();
		
		auto p = pss[ fy ][ fx ];
		if( 1 < p ) return "Impossible";																// このマスまでのルートが複数あったらダメ
		if( 0 < fy && ass[ fy - 1 ][ fx ] == '#' && pss[ fy - 1 ][ fx ] == 0 ) return "Impossible";		// このマスの上に踏んでないマスがあったらダメ
		if( 0 < fx && ass[ fy ][ fx - 1 ] == '#' && pss[ fy ][ fx - 1 ] == 0 ) return "Impossible";		// このマスの左に踏んでないマスがあったらダメ
		
		foreach( f; [ tuple( fy + 1, fx ), tuple( fy, fx + 1 ) ] )
		{
			if( ass.length <= f[ 0 ] || ass[ 0 ].length <= f[ 1 ] || ass[ f[ 0 ] ][ f[ 1 ] ] != '#' ) continue;
			pss[ f[ 0 ] ][ f[ 1 ] ] += p;
			queue.insertBack( f );
		}
	}
	return "Possible";
}
