import Data.Array
type Pos = (Int,Int)
type Field  = Array Pos Bool
type Size  = [Int]
type Range  = (Pos,Pos)
readsize :: String -> Range
readsize = (\[h,w] -> fieldrange h w ) . map read . words . head . lines
readfield :: Range -> String -> Field
readfield range  = listArray range . map onPath . concat . tail . lines
fieldrange h w = ((0,0),(h-1, w-1)) 
onPath :: Char -> Bool
onPath x
    | x == '#' = True
    | x == '.' = False
main = do
    str <- getContents
    let frange = readsize str
        field = readfield frange str
    putStrLn $ getAns $ and $ map (hasCorrectPath field) $ path field

right (x,y) = (x,y+1)
left  (x,y) = (x,y-1)
down  (x,y) = (x+1,y)
up    (x,y) = (x-1,y)
has :: (Pos->Pos) -> Field -> Pos -> Bool
has f field pos = field `el`  f  pos
hasCorrectPath :: Field -> Pos -> Bool
hasCorrectPath field pos = (has up field pos `nand` has left field pos) && (has down field pos `nand` has right field pos)
path = map (\(i,x)->i) . filter (\(i,x) -> x) . assocs

getAns True = "Possible"
getAns False = "Impossible"

nand a b = not $ a && b

el :: Field -> Pos -> Bool
el a i
    | inRange (bounds a) i  = a ! i
    | otherwise             = False
