print"@{@1=grep$$_-2,grep++$$_,<>=~/./g}"||Impossible