#include <bits/stdc++.h>
#define MP make_pair
#define PB push_back
#define int long long
#define FOR(i, a, b) for(int i =(a); i <=(b); ++i)
#define RE(i, n) FOR(i, 1, n)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
#define REP(i, n) for(int i = 0;i <(n); ++i)
#define VAR(v, i) __typeof(i) v=(i)
#define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#ifdef LOCAL
#define debug(x) {cerr <<#x <<" = " <<x <<"\n"; }
#define debug2(x, y) {cerr <<#x <<" = " <<x <<", "<<#y <<" = " <<y <<"\n";}
#define debug3(x, y, z) {cerr <<#x <<" = " <<x <<", "<<#y <<" = " <<y <<", "<<#z<<" = "<<z<<"\n";}
#define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<"\n"; }}
using std:: cerr ;
#else
#define debug(x)
#define debug2(x, y)
#define debug3(x, y, z)
#define debugv(x)
#define cerr if(0)cout
#endif
#define make(type, x) type x; cin>>x;
#define make2(type, x, y) type x, y; cin>>x>>y;
#define make3(type, x, y, z) type x, y, z; cin>>x>>y>>z;
#define make4(type, x, y, z, t) type x, y, z, t; cin>>x>>y>>z>>t;
using std:: endl ;
using std:: cout ;
using std:: cin ;
using std:: vector ;
using std:: set ;
using std:: map ;
using std:: pair ;
using std:: max ;
using std:: min ;
using std:: ostream ;
using std:: fixed ;
using std:: ios_base ;
using std:: setprecision ;
using std:: make_pair ;
using std:: string ;
using std:: multiset ;
using std:: next_permutation ;
using std:: prev_permutation ;
using std:: random_shuffle ;
using std:: greater ;
using std:: lower_bound ;
using std:: upper_bound ;
using std:: reverse ;
using std:: swap ;
using std:: complex ;
using std:: sort ;
using std:: bitset ;
using std:: unordered_set ;
typedef long long ll;
typedef long double LD;
typedef pair< int , int > PII;
typedef pair< ll, ll> PLL;
typedef vector< int > VI;
typedef vector< ll> VLL;
typedef vector< pair< int , int > > VPII;
typedef vector< pair< ll, ll> > VPLL;
template < class C> void mini( C& a4, C b4) { a4= min( a4, b4) ; }
template < class C> void maxi( C& a4, C b4) { a4= max( a4, b4) ; }
template < class T1, class T2>
ostream& operator<< ( ostream & out, pair< T1, T2> pair) { return out << "(" << pair.first << ", " << pair.second << ")" ; }
const int N = 15 ;
unordered_set< int > dp[ 1 << N] [ N] ;
int dis[ N] [ N] ;
int n, l;
int full_mask;
void Dfs( int mask, int v, int used, int len) {
if ( 2 * used + 1 >= n) {
dp[ mask] [ v] .insert ( len) ;
if ( v ! = 1 ) {
int cor_mask = full_mask - mask + ( 1 << ( v - 2 ) ) ;
if ( dp[ cor_mask] [ v] .count ( l - len) ) {
cout << "possible" << endl;
exit ( 0 ) ;
}
}
}
if ( 2 * used >= n) {
return ;
}
FOR ( nei, 2 , n) {
int nei_bit = nei - 2 ;
if ( ( ( 1 << nei_bit) & mask) == 0 ) {
int new_mask = mask + ( 1 << nei_bit) ;
if ( len + dis[ v] [ nei] <= l) {
Dfs( new_mask, nei, used + 1 , len + dis[ v] [ nei] ) ;
}
}
}
}
#undef int
int main( ) {
#define int long long
ios_base:: sync_with_stdio ( 0 ) ;
cout << fixed << setprecision( 10 ) ;
beg_clock = 1.0 * clock ( ) / CLOCKS_PER_SEC ;
TimeStamp( ) ;
cin >> n>> l;
RE ( i, n) {
RE ( j, n) {
cin >> dis[ i] [ j] ;
}
}
full_mask = ( 1 << ( n - 1 ) ) - 1 ;
Dfs( 0 , 1 , 0 , 0 ) ;
cout << "impossible\n " ;
return 0 ;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgTVAgbWFrZV9wYWlyCiNkZWZpbmUgUEIgcHVzaF9iYWNrCiNkZWZpbmUgaW50IGxvbmcgbG9uZwojZGVmaW5lIEZPUihpLCBhLCBiKSBmb3IoaW50IGkgPShhKTsgaSA8PShiKTsgKytpKQojZGVmaW5lIFJFKGksIG4pIEZPUihpLCAxLCBuKQojZGVmaW5lI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