RT,有无法判断Impossible的问题,但不影响,蒟蒻求调
#include<bits/stdc++.h>
#define endl "\n"
#define mp make_pair
#define int long long
#define ull unsigned long long
using namespace std;
const long long mod=1000000001;
const long long P=201;
map<string,int>a;
int n;
signed main()
{
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
// freopen("ce.in","r",stdin);
// freopen("ce.out","w",stdout);
string x,y;
while(cin>>x>>y)
{
if(x!=y)++a[x];++a[y];
}
int cnt=0;
for(auto x:a)
{
if(x.second%2==1)cnt++;
}
if(cnt<=2)cout<<"Possible";
else cout<<"Impossible";
return 0;
exit(0);
}
/*
*/