H,W = list(map(int,input().split()))

res = ''

for i in range(H):

    res += eval(input())

if res.count('#') == H+W-1:

    print('Possible')

else:

    print('Impossible')

H,W = list(map(int,input().split()))



res = 0



for i in range(H):

    res += input().count('#')



if res == H+W-1:

    print('Possible')

else:

    print('Impossible')
H, W = list(map(int, input().split()))
res = ""
for i in range(H):
    res += eval(input())
if res.count("#") == H + W - 1:
    print("Possible")
else:
    print("Impossible")

H, W = list(map(int, input().split()))
res = 0
for i in range(H):
    res += input().count("#")
if res == H + W - 1:
    print("Possible")
else:
    print("Impossible")

-res = "" +res = 0 -    res += eval(input()) -if res.count("#") == H + W - 1: +    res += input().count("#") +if res == H + W - 1: