output_description: If it is possible to go to Island N by using two boat services, print
  `POSSIBLE`; otherwise, print `IMPOSSIBLE`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      a_1 b_1
      a_2 b_2
      :
      a_M b_M
attempt: // #define _GLIBCXX_DEBUG
  #include <bits/stdc++.h>
  using namespace std;
  #define uint unsigned int
  #define ull  unsigned long long
  typedef string str;
  typedef long long ll;
  typedef double db;
  typedef pair<int, int> pii;
  typedef map<int, int> mii;
  typedef vector<int> vi;
  typedef vector<bool> vb;
  #define pb push_back
  #define fi first
  #define se second
  #define in insert
  #define all(x) (x).begin(), (x).end()
  #define rall(x) (x).rbegin(), (x).rend()
  #define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
  const int INF = 1e9 + 5;
  const int N = 2e5 + 1;
  // int a[N][N];
  int main(){
      speed;
      int n, m;
      cin >> n >> m;
      vi a, b;
      for(int i = 0; i < m; ++i){
          int x, y;
          cin >> x >> y;
          if(x == 1){
              a.pb(y);
          }
          if(y == n){
              b.pb(x);
          }
      }
      for(int i = 0; i < a.size(); ++i){
          for(int j = 0; j < b.size(); ++j){
              if(a[i] == b[j]){
                  cout << "POSSIBLE";
                  return 0;
              }
          }
      }
      cout << "IMPOSSIBLE";
  }
problem_description: Statement
  
  In Takahashi Kingdom, there is an archipelago of N islands, called Takahashi
  Islands. For convenience, we will call them Island 1, Island 2, ..., Island N.
  
  There are M kinds of regular boat services between these islands. Each service
  connects two islands. The i-th service connects Island a_i and Island b_i.
  
  Cat Snuke is on Island 1 now, and wants to go to Island N. However, it turned
  out that there is no boat service from Island 1 to Island N, so he wants to
  know whether it is possible to go to Island N by using two boat services.
  
  Help him.
samples: [{"input": "3 2\n    1 2\n    2 3", "output": "POSSIBLE\n    \n\n* * *"}, {"input": "4 3\n    1 2\n    2 3\n    3 4", "output": "IMPOSSIBLE\n    \n\nYou have to use three boat services to get to Island 4.\n\n* * *"}, {"input": "100000 1\n    1 99999", "output": "IMPOSSIBLE\n    \n\n* * *"}, {"input": "5 5\n    1 3\n    4 5\n    2 3\n    2 4\n    1 4", "output": "POSSIBLE\n    \n\nYou can get to Island 5 by using two boat services: Island 1 -> Island 4 ->\nIsland 5."}]