#include #include int main(void){ std::string h,s; std::cin>>h>>s; if(h.back() == s.back()){ std::cout << "Possible" << std::endl; } else { std::cout << "Impossible" << std::endl; } }